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;宽度调整一下,在你的基础上增加些代码即可。
说明一下:gcorelabs的俄罗斯远东机房“伯力”既有“Virtual servers”也有“CLOUD SERVICES”,前者是VPS,后者是云服务器,不是一回事;由于平日大家习惯把VPS和云服务器当做一回事儿,所以这里要特别说明一下。本次测评的是gcorelabs的cloud,也就是云服务器。 官方网站:https://gcorelabs.com 支持:数字加密货币、信用卡、PayPal...
GigsGigsCloud商家在之前介绍的还是比较多的,因为之前我一直有几台机器在使用,只是最近几年网站都陆续转型删除掉不少的网站和闲置域名,包括今年也都减少网站开始转型自媒体方向。GigsGigsCloud 商家产品还是比较有特色的,有提供香港、新加坡等亚洲机房的云服务器、VPS和独立服务器等。第一、新春优惠活动优惠码:CNY2022-15OFF截止到正月初二,我们可以使用上述优惠码在购买指定G...
pigyun怎么样?PIGYunData成立于2019年,2021是PIGYun为用户提供稳定服务的第三年,目前商家提供香港CN2线路、韩国cn2线路、美西CUVIP-9929、GIA等线路优质VPS,基于KVM虚拟架构,商家采用魔方云平台,所有的配置都可以弹性选择,目前商家推出了七月优惠,韩国和美国所有线路都有相应的促销,六折至八折,性价比不错。点击进入:PIGYun官方网站地址PIGYUN优惠...