當(dāng)前位置:軟件學(xué)堂 > 資訊首頁 > 網(wǎng)絡(luò)編程 > DIV+CSS > html滾動(dòng)次數(shù)loop

html滾動(dòng)次數(shù)loop

2012/11/18 10:17:43作者:佚名來源:網(wǎng)絡(luò)

移動(dòng)端

【實(shí)例介紹】

html滾動(dòng)次數(shù)loop

默認(rèn)情況下會(huì)不斷地循環(huán)下去,如果希望滾動(dòng)幾次停止,可以使用loop設(shè)置滾動(dòng)次數(shù)。

【基本語法】

<marquee loop="循環(huán)次數(shù)">···</marquee>

【語法介紹】

【實(shí)例代碼】

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標(biāo)題文檔</title> </head> <body> <marquee  direction="up"   loop="5"> 很欣喜的,我看到了花兒們的美麗,感受到了它們的勃勃生機(jī),更聽到了它們對(duì)春天的深情呼喚。 </marquee> </body> </html>

【代碼分析】

在代碼中,加粗部分的標(biāo)記是設(shè)置滾動(dòng)文字的循環(huán)次數(shù),在瀏覽器中預(yù)覽循環(huán)5次的效果,如圖所示。

滾動(dòng)次數(shù)loop運(yùn)行效果

 【素材及源碼下載】

請(qǐng)點(diǎn)擊:html滾動(dòng)次數(shù)loop 下載本實(shí)例相關(guān)素材及源碼

 

標(biāo)簽: html  滾動(dòng)