js文字向上滚动代码
js文字向上滚动代码
<style>
.pczt_pingfen_jhxs_news1{ width:397px; background:#edfafd; padding-top:2px; padding-bottom:2px; margin:0 auto;}
.pczt_pingfen_jhxs_xian{ width:382px; margin:0 auto; border:1px dashed #a8d1dd; border-left:none; border-right:none;}
.pczt_pingfen_jhxs_noxian{ width:382px; margin:0 auto; border:none;}
.pczt_pingfen_jhxs_wenzi{color:#185881; text-align:center; line-height:30px;}
.pczt_pingfen_jhxs_wenzi2{line-height:22px; font-size:12px; text-indent:2em; color:#525252;}
</style>
<div
id="demo" onmouseover="clearInterval(timer)"
onmouseout="timer=setInterval(mar,30)" style="overflow:hidden;
height:225px; width:100%;">
<div id="demo1" style="height:100%;" >
<div class="pczt_pingfen_jhxs_news1" >
<div class="pczt_pingfen_jhxs_xian">
<h4 class="pczt_pingfen_jhxs_wenzi">CGWR 《武林至尊》游戏评测</h4>
<p class="pczt_pingfen_jhxs_wenzi2">《武林至尊》没有依照任何名著来搭建自己的世界观,而是通过
设计员自己的脑子,想出了一个完美的剧情。虽比不了仙剑奇侠
传的剧情经典,但也堪称引人入胜。再加上独有的部分特色,所
以吸引了众多武侠迷进入了游戏。</p>
</div>
</div>
<div class="pczt_pingfen_jhxs_noxian">
<h4 class="pczt_pingfen_jhxs_wenzi">17173《武林至尊》试玩视频</h4>
<p class="pczt_pingfen_jhxs_wenzi2">《武林至尊》是一款华丽3D锁视角武侠网游巅峰巨作,真实再现
了万千华人梦想中的武侠世界。它秉承纯正的中国武侠文化,彻
底摒弃传统网游的职业概念,无职业限制,技能完全自由搭配,</p>
</div>
<div id="demo2"></div>
</div>
</div>
<script>
var t=getid("demo"),t1=getid("demo1"),t2=getid("demo2"),sh=getid("show"),timer;
t2.innerHTML=t1.innerHTML;
function mar(){
if(t2.offsetTop<=t.scrollTop)
t.scrollTop-=t1.offsetHeight;
else
t.scrollTop++;
}
timer=setInterval(mar,30);
function getid(id){
return document.getElementById(id);
}
</script>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
<div class="s-column4">
<h3>今日成功预约</h3>
<div id="demo" style="overflow:hidden;height:350px;width:320px;margin-top: 20px;">
<div id="demo1">
<ul>
<li><a href="/wz.html" target="_blank"
rel="nofollow">胡小姐 面部白癜风&
nbsp; 预约成
功 5分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">李小姐 颈部白癜风&
nbsp; 预约成
功 8分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">陈先生 手部白癜风&
nbsp; 预约成
功 9分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">郑小姐 脚部白癜风&
nbsp; 预约成
功 11分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">廖小姐 胸部白癜风&
nbsp; 预约成
功 13分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">张小姐 面部白癜风&
nbsp; 预约成
功 16分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">冯先生 颈部白癜风&
nbsp; 预约成
功 25分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">曾先生 手部白癜风&
nbsp; 预约成
功 30分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">黄小姐 脚部白癜风&
nbsp; 预约成
功 30分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">于小姐 背部白癜风&
nbsp; 预约成
功 45分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">赵小姐 面部白癜风&
nbsp; 预约成
功 52分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">董先生 颈部白癜风&
nbsp; 预约成
功 1小时前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">刘小姐 脚部白癜风&
nbsp; 预约成
功 1小时前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">李先生 背部白癜风&
nbsp; 预约成
功 1小时前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">黄小姐 面部白癜风&
nbsp; 预约成
功 1小时前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">胡小姐 面部白癜风&
nbsp; 预约成
功 5分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">李小姐 颈部白癜风&
nbsp; 预约成
功 8分钟前</a></li>
<li><a href="/wz.html" target="_blank"
rel="nofollow">陈先生 手部白癜风&
nbsp; 预约成
功 9分钟前</a></li>
</ul>
</div>
<div id="demo2"></div>
</div>
<!--<script>
var speed=100;
demo2.innerHTML=demo1.innerHTML
function Marquee2(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop++
}
}
var MyMar=setInterval(Marquee2,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee2,speed)}
</script>-->
</div>
<script>
var t=getid("demo"),t1=getid("demo1"),t2=getid("demo2"),sh=getid("show"),timer;
t2.innerHTML=t1.innerHTML;
function mar(){
if(t2.offsetTop<=t.scrollTop)
t.scrollTop-=t1.offsetHeight+"250px";
else
t.scrollTop++;
}
timer=setInterval(mar,30);
function getid(id){
return document.getElementById(id);
}
</script>
js文字向上滚动代码的更多相关文章
- js文字上下滚动代码
<div id="dome"> <div id="dome1"> <ul class="express"> ...
- jquery 文字向上滚动+CSS伪类before和after的应用
汇总常用技巧——CSS伪类before和after的应用 先上效果图,建议遵循有图有真相的原则,可以上图的地方,还望不要嫌麻烦,毕竟有图的话 可以让读者少花些时间! <!DOCTYPE html ...
- js图片无缝滚动代码
想必大家都注意到<marquee>的不循环滚动,所以出现了很多替代脚本,或iframe或JS输出<marquee>,不管怎么做,都略显麻烦.下面说一下这个相对简单的实现思路:一 ...
- js标题文字向上滚动
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xht ...
- js实现向上滚动效果
源码: <style type="text/css"> #up_zzjs{border:1px solid #ccc;width:170px;height:182px; ...
- html js文字左右滚动插件
自己写过很多插件,但都是直接嵌入在了工程里,从来没有拿出来单独封装成一个文件过,这是第一次,希望是一个良好的开端. 一个文字过长而可以左右滚动的插件 <!DOCTYPE html> < ...
- 纯Js ——文字上下左右滚动
ScrollBaseJs.js var $$ = function (id) { return typeof id == 'string' ? document.getElementById(id) ...
- vue文字向上滚动
<template> <vue-seamless-scroll :data="listData" :class-option="optionHover& ...
- js文字无缝滚动
<div id=demo style="overflow:hidden; width:128px; height:300px;"> <div id=demo1&g ...
随机推荐
- SPI,UART,I2C都有什么区别,及其各自的特点
区别: SPI:高速同步串行口.3-4线接口,收发独立.可同步进行 UART:通用异步串行口.按照标准波特率完成双向通讯,速度慢 I2C:一种串行传输方式,三线制,网上可找到其通信协议和用法的 3根线 ...
- 简单登陆UI设计
简单UI设计 作品效果图: 关键技术: 用到了本地化控件:SharedPreferences,简单的说就是本地配置. 四大组件:Intent 基本思路请看代码: Java代码: import ...
- ACM2096_小明A+B
#include<iostream> int main() { using namespace std; int a,b,count; cin>>count; while(co ...
- poj 2479 Maximum sum (最大字段和的变形)
题目链接:http://poj.org/problem?id=2479 #include<cstdio> #include<cstring> #include<iostr ...
- codeforces 710C
C. Magic Odd Square time limit per test 1 second memory limit per test 256 megabytes input standard ...
- thinkphp框架dump友好调试输出函数
/** * 浏览器友好的变量输出 * @param mixed $var 变量 * @param boolean $echo 是否输出 默认为True 如果为false 则返回输出字符串 * @par ...
- bzoj4448 SCOI2015 情报传递 message
传送门bzoj4448 题解 离线之后构建树上主席树,每个点的线段树维护到根路径的信息,不用链剖(我的链剖只是拿来求\(\mathrm{lca}\)的),时空复杂度\(O(n\log{n})\). c ...
- C# 字符串常用操作 分类: C# 2014-08-22 15:07 238人阅读 评论(0) 收藏
string str1 = "C#操作字符串<几种常见方式>如下"; string str2 = "C#操作字符串"; //比较字符串 Co ...
- eclipse GWT开发环境的离线布置方法
安装方法http://blog.csdn.net/u011029071/article/details/10143841 用eclipse自动更新安装失败N次,还是得手动来 以Google Plugi ...
- Amoeba实现mysql主从读写分离
Amoeba实现mysql主从读写分离 这段在网上看了下关于amoeba的文章,总体感觉好像要比mysql-proxy好的多,也参考了不少的资料,此文章可能与其他文章作者会有雷同的地方,请谅解,但是此 ...