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;宽度调整一下,在你的基础上增加些代码即可。
IonSwitch是一家2016年成立的国外VPS主机商,部落上一次分享的信息还停留在2019年,主机商提供基于KVM架构的VPS产品,数据中心之前在美国西雅图,目前是美国爱达荷州科德阿伦(美国西北部,西接华盛顿州和俄勒冈州),为新建的自营数据中心。商家针对新数据中心运行及4号独立日提供了一个5折优惠码,优惠后最低1GB内存套餐每月仅1.75美元起。下面列出部分套餐配置信息。CPU:1core内存...
cyun怎么样?cyun蓝米数据是一家(香港)藍米數據有限公司旗下品牌,蓝米云、蓝米主机等同属于该公司品牌。CYUN全系列云产品采用KVM架构,SSD磁盘阵列,优化线路,低延迟,高稳定。目前,cyun推出的香港云服务器性价比超高,香港cn2 gia云服务器,1核1G1M/系统盘+20G数据盘,低至29元/月起;香港多ip站群云服务器,16个ip/4核4G仅220元/月起,希望买香港站群服务器的站长...
中秋节快到了,spinservers针对中国用户准备了几款圣何塞机房特别独立服务器,大家知道这家服务器都是高配,这次推出的机器除了配置高以外,默认1Gbps不限制流量,解除了常规机器10TB/月的流量限制,价格每月179美元起,机器自动化上架,一般30分钟内,有基本自助管理功能,带IPMI,支持安装Windows或者Linux操作系统。配置一 $179/月CPU:Dual Intel Xeon E...