繁體
|
簡體
Sclub交友聊天~加入聊天室當版主
(檢舉)
分享
新浪微博
QQ空间
人人网
腾讯微博
Facebook
Google+
Plurk
Twitter
Line
标题:
分享一个我的图片轮播代码给大家
[打印本页]
作者:
mc0713
时间:
2018-8-29 20:11
标题:
分享一个我的图片轮播代码给大家
<style type="text/css">
<!--
#demo {
background: #FFF;
overflow:hidden;
border: 1px dashed #CCC;
width: 958px;
}
#demo img {
border: 3px solid #F2F2F2;
}
#indemo {
float: left;
width: 955%;
}
#demo1 {
float: left;
}
#demo2 {
float: left;
}
-->
</style>
<div id="demo">
<div id="indemo">
<div id="demo1">
<a href='http://mc0713.66rt.com/thread-244-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180818/1808180947d7f7a346491f15af.jpeg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-252-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180819/1808192233d7ac3b44cd9ff999.jpeg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-234-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180815/1808152130365854e7350e7a02.jpg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-246-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180818/1808181323529c8b9ecb65210a.jpg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-249-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180818/1808182217ce8d5828b84c18e3.gif width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-250-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180819/18081907386d2a2d1f57ea0572.jpeg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-221-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180813/1808131849e844bc32d7e49f73.jpeg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-254-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180820/18082010070a297697fea30560.jpg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-39-1-2.html'><img src=http://mc0713.66rt.com/attachments/day_180807/1808071816176aacf6ae3e2a8f.jpeg width=120 height=80 border="0"/></a>
<a href='http://mc0713.66rt.com/thread-222-1-1.html'><img src=http://mc0713.66rt.com/attachments/day_180813/180813185994946ea6bcf50b08.jpeg width=120 height=80 border="0"/></a>
<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>
复制代码
上面的图片链接图片所在帖子链接自行本地记事本更换,代码可放第三,头部,广告等位置,自己选择合适的地方放吧,我就不一一解释了。
欢迎光临 麻城生活网 (http://www.mc0713.66rt.com/)
Powered by Discuz! 7.2