css-可繼承和不可繼承的屬性

1.css哪些屬性能夠繼承?哪些不可繼承?

css屬性分類css

字體屬性:web

font-family,font-size,font-style,font-variant,font-weight,font可繼承svg

ps: font-size繼承的是計算後的實際值佈局

文本屬性:字體

word-spacing letter-spacing text-align text-transform text-indent line-height能夠繼承spa

text-decoration vertical-align不可繼承orm

顏色背景屬性:xml

color能夠繼承繼承

background(background-color background-image background-repeat background-attachment background-position)不可繼承ci

邊框屬性:

border(border-top border-right border-bottom border-left)(border-width border-style border-color)不能夠繼承

定位和佈局屬性:

margin padding width height float clear position left top overflow z-index display不能夠繼承

列表屬性:

list-style-image, list-style-position,list-style-type, list-style能夠繼承