css部分:--------------------------------
#r_2 {width:768px; height:130px; padding-left:3px; padding-right:5px; background-color:#FFFFFF; overflow:hidden; :3px;display:inline; } #scroll_div{OVERFLOW: hidden;height:133px;WIDTH: 658px;white-space: nowrap;}
滚动区域:------------------------------
<DIV id="scroll_div"> <div id="r_2"> <img src="images/pro/3.jpg" width="120" height="133" border="0"/> <img src="images/pro/6.jpg" width="120" height="133" border="0"/> <img src="images/pro/7.jpg" width="120" height="133" border="0"/> <img src="images/pro/8.jpg" width="120" height="133" border="0"/> <img src="images/pro/21.jpg" width="120" height="133" border="0"/> <img src="images/pro/22.jpg" width="120" height="133" border="0"/> <img src="images/pro/23.jpg" width="120" height="133" border="0"/> <img src="images/pro/24.jpg" width="120" height="133" border="0"/> <img src="images/pro/25.jpg" width="120" height="133" border="0"/> <img src="images/pro/h_15.jpg" width="120" height="133" border="0"/> <img src="images/pro/h_2.jpg" width="120" height="133" border="0"/> <img src="images/pro/h_8.jpg" width="120" height="133" border="0"/> <img src="images/pro/h_7.jpg" width="120" height="133" border="0"/> </div>
<div id="scroll_end" style="display:inline;">
</div>
</DIV>
脚本代码:------------------------------
<SCRIPT>
var speed=1
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=r_2.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=r_2.offsetWidth
else{
scroll_div.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>
WIDTH: 658px;宽度调整一下,在你的基础上增加些代码即可。
mineserver怎么样?mineserver是一家国人商家,主要提供香港CN2 KVM VPS、香港CMI KVM VPS、日本CN2 KVM VPS、洛杉矶cn2 gia端口转发等服务,云服务器网(yuntue.com)介绍过几次,最近比较活跃。现在新推出了3款特价KVM VPS,性价比高,香港CMI/洛杉矶GIA VPS,2核/2GB内存/20GB NVME/3.5TB流量/200Mbps...
profitserver正在对德国vps(法兰克福)、西班牙vps(马德里)、荷兰vps(杜廷赫姆)这3处数据中心内的VPS进行5折优惠促销。所有VPS基于KVM虚拟,纯SSD阵列,自带一个IPv4,不限制流量,在后台支持自定义ISO文件,方便大家折腾!此外还有以下数据中心:俄罗斯(多机房)、捷克、保加利亚、立陶宛、新加坡、美国(洛杉矶、锡考克斯、迈阿密)、瑞士、波兰、乌克兰,VPS和前面的一样性...
hostkvm怎么样?hostkvm是一家国内老牌主机商家,商家主要销售KVM架构的VPS,目前有美国、日本、韩国、中国香港等地的服务,站长目前还持有他家香港CN2线路的套餐,已经用了一年多了,除了前段时间香港被整段攻击以外,一直非常稳定,是做站的不二选择,目前商家针对香港云地和韩国机房的套餐进行7折优惠,其他套餐为8折,商家支持paypal和支付宝付款。点击进入:hostkvm官方网站地址hos...