marquee標(biāo)簽(html滾動(dòng)效果)

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>

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容