當前位置:軟件學堂 > 資訊首頁 > 網絡編程 > DIV+CSS > html滾動區(qū)域的背景顏色bgcolor

html滾動區(qū)域的背景顏色bgcolor

2012/11/18 20:26:16作者:佚名來源:網絡

移動端

【實例介紹】

html滾動區(qū)域的背景顏色bgcolor

在網頁中,為了突出某部分內容,常常使用不同的背景色來顯示。可以使用bgcolor設置滾動背景顏色。

【基本語法】

<marquee bgcolor="背景顏色">···</marquee>

【語法介紹】

滾動背景顏色設置為十六進制值的顏色。

【實例代碼】

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標題文檔</title> </head> <body><marquee  direction="up"  scrollamount="3" bgcolor="#889966"> 壯志雄略握心中,芳名千古年少夢。三年五載始爭雄,志大才盛方為贏。輾轉泥濘夜難眠, 心酸孤意常相伴。乘風破浪終有時,青春雖逝業(yè)輝煌。</marquee> </body> </html>

【代碼分析】

在代碼中,加粗部分的代碼標記設置了滾動文字的背景,在瀏覽器中預覽,滾動文字后面的背景呈綠色,如圖所示。

滾動區(qū)域的背景顏色bgcolor運行效果

 【素材及源碼下載】

請點擊:html滾動區(qū)域的背景顏色bgcolor 下載本實例相關素材及源碼

 

標簽: html  滾動  bgcolor