今夜不设防张国荣头像:请教:谁知道怎样用javascript写文本横向不间断滚动的代码?

来源:百度文库 编辑:高考问答 时间:2024/04/27 21:49:26
最好是能调节滚动速度,滚动效果比较平滑的那种!
谢谢各位,前两位朋友说的我试过了,但是我想要那种不间断滚动的!哪怕只有一条文本时,也是首尾相连的滚动~~!

<marquee id="scrollarea" direction="up" scrolldelay="5" scrollamount="5" width="167" height="580" onmouseover="this.stop();" onmouseout="this.start();"> 内容 </marquee>

direction=方向 up,left,right
scrolled=滚动方式
scrollamount= 速度 越小越慢
width=宽
height=高
onmouseover="this.stop();" 鼠标放在上面停止移动
onmouseout="this.start();" 拿开鼠标继续移动
scrollAmount=2 表示移动速度 数字越大,速度越快

<marquee direction="left" onmouseover="stop()" onmouseout="start()" scrollamount="1" scrolldelay="100" width="150" height='340'>
文本内容
</marquee>

属性:
direction (文字移动的次序)

scrollamount (移动的速度)
其它一些属性,应该不用多说了。

<marquee>
文本内容
</marquee>