php background-color:,background-color属性怎么用
background
英 [?b?kgra?nd]? ?美 [?b?k?ɡra?nd]
n.(畫等的)背景;底色;背景資料;配樂
復(fù)數(shù): backgrounds
color
英 ['k?l?(r)]? ?美 [?k?l?]
n.顏色,色彩;膚色,臉色,血色;顏料,染料;本質(zhì)
v.給…涂顏色;改變…的顏色;粉飾,渲染,使帶上色彩;臉紅
第三人稱單數(shù): colors 復(fù)數(shù): colors 現(xiàn)在分詞: coloring 過去式: colored 過去分詞: colored
css background-color屬性 語法
background-color屬性怎么用?
background-color屬性用來設(shè)置元素的背景顏色(純色),語法為:background-color:顏色值。這種顏色會填充元素的內(nèi)容、內(nèi)邊距和邊框區(qū)域,擴(kuò)展到元素邊框的外邊界(但不包括外邊距)。
作用:設(shè)置元素的背景顏色。
說明:background-color 屬性為元素設(shè)置一種純色。這種顏色會填充元素的內(nèi)容、內(nèi)邊距和邊框區(qū)域,擴(kuò)展到元素邊框的外邊界(但不包括外邊距)。如果邊框有透明部分(如虛線邊框),會透過這些透明部分顯示出背景色。
注釋:任何版本的 Internet Explorer (包括 IE8)都不支持屬性值 "inherit"。
css background-color屬性 示例
body?{background-color:?yellow}
h1?{background-color:?#00ff00}
h2?{background-color:?transparent}
p?{background-color:?rgb(250,0,255)}
p.no2?{background-color:?gray;?padding:?20px;}
這是標(biāo)題?1
這是標(biāo)題?2
這是段落
這個段落設(shè)置了內(nèi)邊距。
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例
熱門推薦
最新文章
總結(jié)
以上是生活随笔為你收集整理的php background-color:,background-color属性怎么用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: matlab曲线拟合法,MATLAB曲线
- 下一篇: 串联矩阵matlab代码,Matlab串