求,div ul li 无缝滚动代码 JS的
展开全部
<div id="demo" style="overflow:hidden;height:500px;width:120px; border:1px solid #dde5bc; overflow:hidden;float:left">
<div id=demo1>
<img src="images/js01.gif" width="120" height="120">
<img src="images/js02.gif" width="120" height="120">姿配
<img src="images/js03.gif" width="120" height="120">
<img src="images/js04.gif" width="120" height="120">
<img src="images/js05.gif" width="120" height="120">
<img src="images/液嫌js06.gif" width="120" height="120">
<img src="images/js07.gif" width="120"迹埋指 height="120">
<img src="images/js08.gif" width="120" height="120">
<img src="images/js09.gif" width="120" height="120">
</div>
<div id=demo2></div>
</div>
<script>
var speed=40
var demo=document.getElementById("demo");
var demo2=document.getElementById("demo2");
var demo1=document.getElementById("demo1");
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>
<div id=demo1>
<img src="images/js01.gif" width="120" height="120">
<img src="images/js02.gif" width="120" height="120">姿配
<img src="images/js03.gif" width="120" height="120">
<img src="images/js04.gif" width="120" height="120">
<img src="images/js05.gif" width="120" height="120">
<img src="images/液嫌js06.gif" width="120" height="120">
<img src="images/js07.gif" width="120"迹埋指 height="120">
<img src="images/js08.gif" width="120" height="120">
<img src="images/js09.gif" width="120" height="120">
</div>
<div id=demo2></div>
</div>
<script>
var speed=40
var demo=document.getElementById("demo");
var demo2=document.getElementById("demo2");
var demo1=document.getElementById("demo1");
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>
展开全部
现在网上米态源举有你说的 div ul li 的无缝的,裂敏因为那种放上去一般只能在 ie6 7 8 9里面用,你帆碧出50分肯定是要能够兼容全部浏览器,而且是div 带 ul li 的那种米得点又不换行的,偶可以写那种,但这一个月不会有时间,但过些时偶会放些js方面的代码到网上,如果你真有兴趣,可以过一个月搜索 飞妹,也许那时偶会放上这类代码。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<style>
*{margin:0; padding:0; border:0;}
body{ font-size:12px; font:"宋体";color:#30302E;}
a{ text-decoration:none; color:#636363;}
a:hover{text-decoration:none; color:#F06D8D;}
ul,ol{list-style-type:none;}
</style>
<body>
<div id="demo" style="overflow:hidden;height:500px;width:100px; border:1px solid #dde5bc; overflow:hidden;float:left">
<div id=demo1>
<ul>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a>腊戚</li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
</ul>
</div>
<div id=demo2></div>
</div>
<script>
var speed=40
var demo=document.getElementById("demo");
var demo2=document.getElementById("哪薯demo2");
var demo1=document.getElementById("demo1");
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>
如你所愿望~~~~~~~~~记得加分哦 有不李局者懂的可以hi我
百度hi帐号tangxu1024
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<style>
*{margin:0; padding:0; border:0;}
body{ font-size:12px; font:"宋体";color:#30302E;}
a{ text-decoration:none; color:#636363;}
a:hover{text-decoration:none; color:#F06D8D;}
ul,ol{list-style-type:none;}
</style>
<body>
<div id="demo" style="overflow:hidden;height:500px;width:100px; border:1px solid #dde5bc; overflow:hidden;float:left">
<div id=demo1>
<ul>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a>腊戚</li>
<li><a href="#"><img width="100" height="100"></a></li>
<li><a href="#"><img width="100" height="100"></a></li>
</ul>
</div>
<div id=demo2></div>
</div>
<script>
var speed=40
var demo=document.getElementById("demo");
var demo2=document.getElementById("哪薯demo2");
var demo1=document.getElementById("demo1");
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>
如你所愿望~~~~~~~~~记得加分哦 有不李局者懂的可以hi我
百度hi帐号tangxu1024
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询