以下其屬性:
direction
設定活動字幕的滾動方向
代碼如下:
<marquee direction=down>設定活動字幕的滾動方向direction=down:向下</marquee>
<marquee direction=left>設定活動字幕的滾動方向direction=left:向左</marquee>
<marquee direction=right>設定活動字幕的滾動方向direction=right:向右</marquee>
<marquee direction=up>設定活動字幕的滾動方向direction=up:向上</marquee>
behavior
設定滾動的方式:
alternate: 表示在兩端之間來回滾動。
scroll: 表示由一端滾動到另一端,會重複。
slide: 表示由一端滾動到另一端,不會重複。
代碼如下:
<marquee behavior=alternate>alternate:表示在兩端之間來回滾動。 </marquee>
<marquee behavior=scroll>scroll:表示由一端滾動到另一端,會重複。 </marquee>
<marquee behavior=slide>slide: 表示由一端滾動到另一端,不會重複。 </marquee>
scrollamount
設定活動字幕的滾動速度,單位pixels
代碼如下:
<marquee scrollamount=10 >scrollamount=10 </marquee>
<marquee scrollamount=20 >scrollamount=20 </marquee>
<marquee scrollamount=30 >scrollamount=30 </marquee>
scrolldelay
設定活動字幕滾動兩次之間的延遲時間,單位millisecond(毫秒)
值大了會有一步一停頓的效果
代碼如下:
<marquee scrolldelay=10 >scrolldelay=10 </marquee>
<marquee scrolldelay=100 > scrolldelay=100</marquee>
<marquee scrolldelay=1000>scrolldelay=1000 </marquee>