CSS样式表继承指的是,特定的CSS属性向下传递到子孙元素。
可继承的样式:红色为文本相关属性,蓝色为列表相关属性。
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, text-transform,
visibility, voice-family, volume, whitespace,
widows,
word-spacing
不可继承的样式:border padding margin width height ;
值得注意的一点:Font-size的子类继承的不是实际值,而是计算后的值。相关请移步:
http://www.cnphp.info/css-style-inheritance.html