非常美观的缩略图片向左滚动——代码

2014/5/3 16:25:00  人气 2886    黑客破解论坛  
代码如下:<style type=“text/css“>
<!--
#demo {
background: #FFF;
overflow:hidden;
border: 1px dashed #CCC;
width: 100%px;
}
#demo img {
border: 1px solid #F2F2F2;
}
#indemo {
float: left;
width: 800%;
}
#demo1 {
float: left;
}
-->
</style>
<div align=center><div id=“demo“>
<div id=“indemo“>
<div id=“demo1“>
<a href=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“ /></a>
<a href=“www.aouchina.com/...p?id=8“ target=“_blank“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“/></a><a href=“www.aouchina.com/...id=300“ target=“_blank“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“/></a><a href=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“/></a><a href=“www.aouchina.com/...id=359“ target=“_blank“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“/></a><a href=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“/></a><a href=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“><img src=“http://digg.chinaxy.org/attachments/3/da7a285a970a867a52ecaca1f8feaf8d.jpg“ border=“0“ width=“100“ height=“125“/></a>
</div>
<div id=“demo2“></div>
</div>
</div>
<script>
<!--
var speed=10; //数字越大速度越慢
var tab=document.getElementById(“demo“);
var tab1=document.getElementById(“demo1“);
var tab2=document.getElementById(“demo2“);
tab2.innerHTML=tab1.innerHTML;
function Marquee(){
if(tab2.offsetWidth-tab.scrollLeft<=0)
tab.scrollLeft-=tab1.offsetWidth
else{
tab.scrollLeft++;
}
}
var MyMar=setInterval(Marquee,speed);
tab.onmouseover=function() {clearInterval(MyMar)};
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
-->
</script></div>
自己测试看咯,我不知道该怎么演示!!有能力的修改下帖子 演示!

发表回复

   


  通知楼主