好神奇,不用js也能是實(shí)現(xiàn)滾動(dòng)效果

最近一段時(shí)間由于重構(gòu)了一個(gè)項(xiàng)目,一直沒時(shí)間進(jìn)行更新,是時(shí)候冒個(gè)泡了!今天偶然發(fā)現(xiàn)一好玩的標(biāo)簽,和大家分享一下!

  • marquee標(biāo)簽,創(chuàng)建一個(gè)滾動(dòng)的文本字幕,應(yīng)用于文字、圖片、今天才知道,基礎(chǔ)知識有待提高!

文字朝上滾動(dòng)

<marquee direction=up behavior=scroll loop=3 scrollamount=10 scrolldelay=4 bgcolor=#ccc height=150 width=15% hspace=4 vspace=4><P align=center>朝上滾動(dòng)</P></marquee>

marquee標(biāo)簽屬性詳解

  • direction屬性
屬性參數(shù)值 示例代碼
direction="left"向左(默認(rèn)值) <marquee direction="left">向左滾動(dòng)</marquee>
direction="up"向上 <marquee direction="up">向上滾動(dòng)</marquee>
direction="right"向右 <marquee direction="right">向右滾動(dòng)</marquee>
direction="down"向下 <marquee direction="down">向下滾動(dòng)</marquee>
  • behavior屬性
屬性參數(shù)值 示例代碼
behavior="alternate"來回滾動(dòng) <marquee behavior="alternate">來回滾動(dòng)</marquee>
behavior="scroll"單方向循環(huán)滾動(dòng) <marquee behavior="scroll">單方向循環(huán)滾動(dòng)</marquee>
behavior="slide"只滾動(dòng)一次 <marquee behavior="slide">只滾動(dòng)一次</marquee>

-loop屬性

屬性參數(shù)值 示例代碼
loop="2"滾動(dòng)2次 <marquee loop="2">我滾動(dòng)2次。</marquee>
bloop="infinite"無限循環(huán)滾動(dòng) <<marquee loop="infinite">無限循環(huán)滾動(dòng)。</marquee>
loop="-1"無限循環(huán)滾動(dòng) <marquee loop="-1">無限循環(huán)滾動(dòng)。</marquee>
  • scrollamount速度屬性
屬性參數(shù)值 示例代碼
scrollamount="50"速度慢了些 <marquee scrollamount="50">慢了些。</marquee>
scrollamount="100"速度很快 <marquee scrollamount="100">速度很快</marquee>
  • scrolldelay延時(shí)屬性
屬性參數(shù)值 示例代碼
scrolldelay="30"小步前進(jìn) <marquee scrolldelay="30">小步前進(jìn)。</marquee>
scrolldelay="1000"大步前進(jìn) <marquee scrolldelay="1000" scrollamount="100">大步前進(jìn)。</marquee>

常用的就這些 ,同樣支持width、height等屬性。。。

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

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

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