好程序員前端教程css中可被繼承和不可被繼承的屬性
一.無繼承性的屬性css
1.display:規定元素應該生成的框的類型前端
2.文本屬性:vertical-align:垂直文本對齊程序員
text-decoration:規定添加到文本的裝飾瀏覽器
text-shadow:文本陰影效果ide
white-space:空白符的處理佈局
unicode-bidi:設置文本的方向字體
3.盒子模型的屬性:width,height,margin,margin-top,margin-right,margin-bottom,margin-left,border,border-style,border-top(right,bottom,left)-stylespa
border-top(right,bottom,left)-width,border-top(right,bottom,left)-color,border-top,border-right,border-bottom,border-left,code
padding,padding-top,padding-right,padding-bottom,padding-leftorm
4.背景屬性:background,background-color,background-image,background-repeat,background-position,background-attachment
5.定位屬性:float,clear,position,top,right,bottom,left,min-width,min-height,max-width,max-height,overflow,clip,z-index
6.生成內容屬性:content,content-seset,content-increment
7.輪廓樣式屬性:outline,outline-style,outline-width,outline-color
8.頁面樣式屬性:size,page-break-before,page-break-after
9.聲音樣式屬性:pause,pause-before,pause-after,cue,cue-before,cue-after,play-during
二.有繼承性的屬性
1.字體系列屬性:font:組合字體
font-family:規定元素的字體系列
font-weight:設置字體的粗細
font-size:設置字體的尺寸
font-style:設置字體的風格
font-variant:設置小型大寫字母的字體顯示文本,這意味着全部的小寫字母均會被轉換爲大寫,可是全部使用小型大寫字體的字母與其他文本相比,其字體尺寸更小
font-stretch:對當前的font-family進行伸縮變形,全部主流瀏覽器都不支持
font-size-adjust:爲某個元素規定一個aspect值,這樣就能夠保持首選字體的x-height
2.文本系列屬性:text-indent:文本縮進
text-align:文本水平對齊
line-height:行高
word-spacing:增長或減小文單詞間的空白(即字間隔)
letter-spacing:增長或減小字符間的空白(字符間距)
text-transform:控制文本大小寫
direction:規定文本的書寫方向
color:文本顏色
3.元素可見性:visibility
4.表格佈局屬性:caption-side,border-collapse,border-spacing,empty-cells,table-layout
5.列表佈局屬性:list-style,list-style-image,list-style-type,list-style-position
6.生產內容屬性:quotes
7.光標屬性:cursor
8.頁面樣式屬性:page,page-break-inside,Windows,orphans
9.聲音樣式屬性:speak、speak-punctuation、speak-numeral、speak-header、speech-rate、volume、voice-family、pitch、pitch-range、stress、richness、、azimuth、elevation
三.全部元素可繼承屬性
1.元素可見性:visibility
2.光標屬性:cursor
四.內聯元素能夠繼承的屬性
1.字體系列屬性
2.除text-indent,text-align以外的文本系列屬性
五.塊級元素能夠繼承的屬性
1.text-indent,text-align