a)scrollAmount。它表示速度,值越大速度越快。如果沒有它,默認為6,建議設為1~3比較好。
b)width和height,表示滾動區(qū)域的大小,width是寬度,height是高度。特別是在做垂直滾動的時候,一定要設height的值。 c)direction。表示滾動的方向,默認為從右向左:←←←??蛇x的值有right、down、up。滾動方向分別為:right表示→→→,up表示↑,down表示↓。 d)scrollDelay,這也是用來控制速度的,默認為90,值越大,速度越慢。通常scrollDelay是不需要設置的。 e)behavior。用它來控制屬性,默認為循環(huán)滾動,可選的值有alternate(交替滾動)、slide(幻燈片效果,指的是滾動一次,然后停止?jié)L動) 一、向左移動 <marquee><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg><br>從右向左移動</marquee> 二、向右移動 <marquee direction=right><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><br><font color=0000ff size=3 face=宋體><b>從左向右移動</b></font></marquee> 三、向上移動 <marquee direction=up onmouseover=this.stop() scrollamount=5 onmouseout=this.start()><center><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30></center></marquee> 四、向下移動 <marquee direction=down scrollamount=5><center><font color=0000ff size=5 face=華文行楷><b>向下移動</b></font><br><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30></marquee> 五、來回移動 <marquee width=100% behavior=alternate scrollamount=10><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><br><font color=0000ff size=5 face=華文行楷><b>來回移動</b></font></marquee> 六、上下起伏 <marquee direction=left><marquee behavior=alternate direction=up height=100><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg><font color=0000ff size=3 face=華文行楷></b></font></marquee></marquee> 七、中間向兩邊移動: <center><br><marquee width=220 height=50><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><font face=華文彩云 color=#0000ff size=5><br>中間向兩邊移動</font></marquee><marquee direction=right width=220 height=50><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><font face=華文彩云 color=#0000ff size=5><br>中間向兩邊移動<br></marquee></font></center> 八、中間相對上下移動: <marquee direction=up onmouseover=this.stop() scrollamount=3 onmouseout=this.start><center><img src=http://myok.blogchina.com/inc/myoklogo.gif width=90></marquee></center><marquee direction=down scrollamount=3><center><div style="width:400;filter:flipv;"><img src="http://myok.blogchina.com/inc/myoklogo.gif" width=90></div></center></marquee> |
|