1. 程式人生 > >css中那些屬性可以被繼承

css中那些屬性可以被繼承

mil 屬性 ria ext direct tran ade weight -s

主要的有:

字體相關:line-height, font-family, font-size, font-style, font-variant, font-weight, font

文本相關: letter-spacing, text-align, text-indent, text-transform, word-spacing

列表相關:list-style-image, list-style-position, list-style-type, list-style

還有一個比較重要的:color

其他的還有一些不過不常見,可以不記,用到再查就可以了。

下面是所有的可繼承的屬性(按字母排序):

azimuth,

border-collapse, border-spacing,

caption-side, color, cursor,

direction, elevation,

empty-cells,

font-family, font-size, font-style,
font-variant, font-weight, font,

letter-spacing,line-height, list-style-image, list-style-position,
list-style-type, list-style,

orphans, pitch-range,

pitch, quotes, richness,

speak-header, speaknumeral,speak-punctuation, speak, speechrate,
stress,

text-align, text-indent, texttransform,

visibility, voice-family, volume,

whitespace,widows, word-spacing

註意:背景相關的屬性是不會被繼承的哦。

css中那些屬性可以被繼承