4.9w+
社区成员
<marquee direction="up" loop="0">Hello, World</marquee>
把文字替换成img图片,标签意思是从下往上滚,无限滚。。。<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id=demo_t0 style="height:150px;width:150px; overflow:hidden;">
<div id=demo_t1>
<img src="http://avatar.csdn.net/6/8/8/1_huangxuanpeng.jpg" border="0"/>
<img src="http://avatar.csdn.net/E/3/0/1_u013762572.jpg" border="0"/>
</div>
<div id=demo_t2></div>
<script>
var demo_ti=0;
demo_t2.innerHTML=demo_t1.innerHTML
function demo_Marquee(){
if (demo_ti==1)return
if(demo_t2.offsetTop-demo_t0.scrollTop<=0)
demo_t0.scrollTop-=demo_t1.offsetHeight
else
demo_t0.scrollTop++
}
setInterval(demo_Marquee,50)
</script>
</div>
</body>
</html>