古詩詞大全網 - 成語大全 - 使用marquee實現文字上下滾動代碼怎麽寫

使用marquee實現文字上下滾動代碼怎麽寫

在要實現滾動的地方,加入此代碼:

<marquee direction=up>要輸入的文字</marquee>

UP是向上, DOWN是向下,Left向左,Right向右.

這兩個屬性決定文字滾動的速度(scrollamount)和延時(scrolldelay),參數值都是正整數。如下所示:

<marquee scrollamount="100">我速度很快。</marquee>

<marquee scrollamount="50">我慢了些。</marquee>

<marquee scrolldelay="30">我小步前進。</marquee>

<marquee scrolldelay="1000" scrollamount="100">我大步前進。</marquee>

按照自己的需要寫代碼吧,希望能夠幫助妳!