移動字幕代碼
(1) 基本代碼
<marquee>移動文字</marquee>
(2)scrollAmount 它表示速度,值越大速度越快。如果沒有它,默認(rèn)為6,建議設(shè)為1~3比較好
<marquee scrollAmount=2 >文字</marquee>
(3)direction 表示滾動的方向,默認(rèn)為從右向左←??蛇x的值有right、down、up。滾動方向分別為:right表示→,up表示↑,down表示↓
<marquee direction=left>從右向左</marquee>
<marquee direction=right>從左向右移</marquee>
<marquee direction="up" >向上文字</marquee>
<marquee direction="down" >向上文字</marquee>
(4) scrollDelay 這也是用來控制速度的,默認(rèn)為90,值越大,速度越慢。通常scrollDelay是不需要設(shè)置的
<marquee scrolldelay=50>文字</marquee>
(5) behavior 用它來控制屬性,默認(rèn)為循環(huán)滾動,可選的值有alternate(交替滾動)、slide(幻燈片效果,指的是滾動一次,然后停止?jié)L動)
<bihavior=#> #=scroll, slide, alternate>
<marquee behavior=scroll>一圈一圈繞著走</marquee>
<marquee behavior=slide>只走一次就歇了</marquee>
<marquee behavior=alternate>來回走</marquee>
(6)循環(huán) <loop=#> #=次數(shù);若未指定則循環(huán)不止(infinite)
<marquee loop=3 width=50% behavior=scroll>只走 3 趟</marquee>
<marquee loop=3 width=50% behavior=slide>只走 3 趟</marquee>
<marquee loop=3 width=50% behavior=alternate>只走 3 趟</marquee>
(7)速度 <scrollamount=#>
<marquee scrollamount=20>走得好快</marquee>
(8)延時(shí) <scrolldelay=#>
<marquee scrolldelay=500 scrollamount=100>走一步,停一停</marquee>
(9)文字移動,鼠標(biāo)指著就停代碼
<marquee onmouSEOver=stop() onmouseout=start()>文字</marquee>
(10)對齊方式(Align) <align=#> #=top, middle, bottom
<marquee align=# width=400>會移動</marquee>
(11)面積 width和height 表示滾動區(qū)域的大小,width是寬度,height是高度。特別是在做垂直滾動的時(shí)候,一定要設(shè)height的值
<marquee height=40 width=50% bgcolor=aaeeaa>會移動</marquee>
(12)空白(Margins)<hspace=# vspace=#>
<marquee hspace=20 vspace=20 width=150 bgcolor=ffaaaa align=middle>會移動</marquee>
(13)底色 <bgcolor=#> #=rrggbb 16 進(jìn)制數(shù)碼,或者是預(yù)定義色彩:Black, Olive,Teal, Red,Blue,Maroon, Navy,Gray, Lime, Fuchsia, White,Green, Purple,Silver, Yellow,Aqua
<marquee bgcolor=aaaaee>文字</marquee>
(1) 基本代碼
<marquee>移動文字</marquee>
(2)scrollAmount 它表示速度,值越大速度越快。如果沒有它,默認(rèn)為6,建議設(shè)為1~3比較好
<marquee scrollAmount=2 >文字</marquee>
(3)direction 表示滾動的方向,默認(rèn)為從右向左←??蛇x的值有right、down、up。滾動方向分別為:right表示→,up表示↑,down表示↓
<marquee direction=left>從右向左</marquee>
<marquee direction=right>從左向右移</marquee>
<marquee direction="up" >向上文字</marquee>
<marquee direction="down" >向上文字</marquee>
(4) scrollDelay 這也是用來控制速度的,默認(rèn)為90,值越大,速度越慢。通常scrollDelay是不需要設(shè)置的
<marquee scrolldelay=50>文字</marquee>
(5) behavior 用它來控制屬性,默認(rèn)為循環(huán)滾動,可選的值有alternate(交替滾動)、slide(幻燈片效果,指的是滾動一次,然后停止?jié)L動)
<bihavior=#> #=scroll, slide, alternate>
<marquee behavior=scroll>一圈一圈繞著走</marquee>
<marquee behavior=slide>只走一次就歇了</marquee>
<marquee behavior=alternate>來回走</marquee>
(6)循環(huán) <loop=#> #=次數(shù);若未指定則循環(huán)不止(infinite)
<marquee loop=3 width=50% behavior=scroll>只走 3 趟</marquee>
<marquee loop=3 width=50% behavior=slide>只走 3 趟</marquee>
<marquee loop=3 width=50% behavior=alternate>只走 3 趟</marquee>
(7)速度 <scrollamount=#>
<marquee scrollamount=20>走得好快</marquee>
(8)延時(shí) <scrolldelay=#>
<marquee scrolldelay=500 scrollamount=100>走一步,停一停</marquee>
(9)文字移動,鼠標(biāo)指著就停代碼
<marquee onmouSEOver=stop() onmouseout=start()>文字</marquee>
(10)對齊方式(Align) <align=#> #=top, middle, bottom
<marquee align=# width=400>會移動</marquee>
(11)面積 width和height 表示滾動區(qū)域的大小,width是寬度,height是高度。特別是在做垂直滾動的時(shí)候,一定要設(shè)height的值
<marquee height=40 width=50% bgcolor=aaeeaa>會移動</marquee>
(12)空白(Margins)<hspace=# vspace=#>
<marquee hspace=20 vspace=20 width=150 bgcolor=ffaaaa align=middle>會移動</marquee>
(13)底色 <bgcolor=#> #=rrggbb 16 進(jìn)制數(shù)碼,或者是預(yù)定義色彩:Black, Olive,Teal, Red,Blue,Maroon, Navy,Gray, Lime, Fuchsia, White,Green, Purple,Silver, Yellow,Aqua
<marquee bgcolor=aaaaee>文字</marquee>