公告栏无间隙滚动
来源:互联网 发布:mysql if then else 编辑:程序博客网 时间:2024/05/01 14:22
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>公告栏无间隙滚动</title>
</head>
<body>
<div id="demo" style="overflow: hidden; width: 100%; height:152px; color:white; margin:0px;line-height:22px;position:relative;">
<div id="demo1">
·<a href="#" style="text-decoration:none">11111111</a><br>
·<a href="#" style="text-decoration:none">22222222</a><br>
·<a href="#" style="text-decoration:none">33333333</a><br>
·<a href="#" style="text-decoration:none">44444444</a><br>
·<a href="#" style="text-decoration:none">55555555</a><br>
·<a href="#" style="text-decoration:none">66666666</a><br>
·<a href="#" style="text-decoration:none">77777777</a><br>
·<a href="#" style="text-decoration:none">88888888</a><br>
·<a href="#" style="text-decoration:none">99999999</a><br>
·<a href="#" style="text-decoration:none">00000000</a><br>
</div>
<div id="demo2"></div>
</div>
<script>
var speed = 50
var _demo = document.getElementById("demo");
var _demo1 = document.getElementById("demo1");
var _demo2 = document.getElementById("demo2");
demo2.innerHTML = demo1.innerHTML
function Marquee() {
if (_demo2.offsetTop - _demo.scrollTop <= 0) {
_demo.scrollTop -= _demo1.offsetHeight
} else {
_demo.scrollTop++
}
}
var MyMar = setInterval(Marquee, speed)
_demo.onmouseover = function () { clearInterval(MyMar) }
_demo.onmouseout = function () { MyMar = setInterval(Marquee, speed) }
</script>
</body>
</html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>公告栏无间隙滚动</title>
</head>
<body>
<div id="demo" style="overflow: hidden; width: 100%; height:152px; color:white; margin:0px;line-height:22px;position:relative;">
<div id="demo1">
·<a href="#" style="text-decoration:none">11111111</a><br>
·<a href="#" style="text-decoration:none">22222222</a><br>
·<a href="#" style="text-decoration:none">33333333</a><br>
·<a href="#" style="text-decoration:none">44444444</a><br>
·<a href="#" style="text-decoration:none">55555555</a><br>
·<a href="#" style="text-decoration:none">66666666</a><br>
·<a href="#" style="text-decoration:none">77777777</a><br>
·<a href="#" style="text-decoration:none">88888888</a><br>
·<a href="#" style="text-decoration:none">99999999</a><br>
·<a href="#" style="text-decoration:none">00000000</a><br>
</div>
<div id="demo2"></div>
</div>
<script>
var speed = 50
var _demo = document.getElementById("demo");
var _demo1 = document.getElementById("demo1");
var _demo2 = document.getElementById("demo2");
demo2.innerHTML = demo1.innerHTML
function Marquee() {
if (_demo2.offsetTop - _demo.scrollTop <= 0) {
_demo.scrollTop -= _demo1.offsetHeight
} else {
_demo.scrollTop++
}
}
var MyMar = setInterval(Marquee, speed)
_demo.onmouseover = function () { clearInterval(MyMar) }
_demo.onmouseout = function () { MyMar = setInterval(Marquee, speed) }
</script>
</body>
</html>
0 0
- 公告栏无间隙滚动
- 图片无间隙滚动
- 无间隙循环滚动
- Javascript无间隙滚动图片
- js 无间隙滚动函数
- 文字滚动无间隙代码
- jquery无间隙滚动、无缝滚动
- jquery滚动效果-无间隙向上滚动
- jquery滚动效果-无间隙向上滚动
- 滚动公告栏
- ASP水平无间隙滚动图片代码
- 图片无间隙 左右滚动 (初学者"亲身经历")
- js 无间隙向上滚动代码
- 图片向左无间隙循环滚动
- javascript文字无间隙向上滚动代码
- 无间隙图片滚动(关于)
- 文字图片无间隙上下滚动
- js实现列表无间隙循环滚动
- Jsp中图片显示问题以及显示绝对路径图片问题
- vs2010运行mat文件的一个测试代码
- USACO 4.2.2The Perfect Stall 完美的牛栏(二分图最大匹配)
- linux下安装tomcat并设置开机自启动
- Android中获取应用程序(包)的信息-----PackageManager的使用(一)
- 公告栏无间隙滚动
- listview根据touch的坐票来确定获取点击的item view
- Linux vmstat 命令详解
- Mac OS10.10 openfire无法启动问题
- VS2005 Debug时提示没有找到MSVCR80D.dll的解决办法
- Oracle、Mysql、SqlServer
- EJB3.0查询语句JPQL用法
- 注意了:新提交审核版本如果保留检查更新入口审核时将被拒绝
- android4.4设置默认launcher