网页特效代码,不间断连续向上滚动的图片特效
<!-- http://www.itjxue.com/ --> <!-- 把下列代码加到<body>区域内 --> <!-- 指向链接图片url --> <base href="http://www.itjxue.com"> <div id=demo style=overflow:hidden;height:150;width:90;background:#214984;color:#ffffff> <div id=demo1> <!-- 定义图片 --> <img src="/img/link.gif"> <img src="/img/link1.gif"> <img src="/img/link2.gif"> <img src="/img/link3.gif"> <img src="/img/link4.gif"> </div> <div id=demo2></div> </div> <script> var speed=30 demo2.innerHTML=demo1.innerHTML function Marquee(){ if(demo2.offsetTop-demo.scrollTop<=0) demo.scrollTop-=demo1.offsetHeight else{ demo.scrollTop++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]