1.behavior(滾動(dòng)模式)
PS:可取scroll(單向循環(huán))、alternate(來回滾動(dòng))、slide(單次滾動(dòng))
<marquee behavior="scroll">(默認(rèn))向左循環(huán)滾動(dòng)</marquee>
<marquee behavior="alternate">來回滾動(dòng)</marquee>
<marquee behavior="slide">左滾一次</marquee>
2.direction(方向)
PS:可取up,down,left,right,默認(rèn)left
<marquee behavior="scroll" direction="right">向右循環(huán)滾動(dòng)</marquee>
3.loop(循環(huán)控制)
PS:默認(rèn)或-1或infinite無限循環(huán),數(shù)值為循環(huán)次數(shù),循環(huán)結(jié)束后內(nèi)容會(huì)消失,樣式依然存在
<marquee loop="3" bgcolor="red">循環(huán)3次后文字消失,背景依然存在</marquee>
<marquee loop="-1">無限循環(huán)</marquee>
4.scrollamount(滾動(dòng)速度)、scrolldelay(停頓時(shí)間)
PS:scrollamount默認(rèn)6,scrolldelay默認(rèn)0,兩者同時(shí)存在,聽scrollamount的話
<marquee scrollamount="100">數(shù)值越大越快</marquee>
<marquee scrolldelay="10">數(shù)值越小越快</marquee>
5.start()(開始滾動(dòng))、stop()(停止?jié)L動(dòng))
<marquee onmouseover="this.stop()" onmouseout="this.start()">鼠標(biāo)移入停止,移出繼續(xù)滾動(dòng)</marquee>