继承性
概念:父元素向后代元素传递属性的机制
表现:后代元素会继承父元素的属性
总结常用可继承的属性
一般text-,line-,font-,color,开头的基本都能继承 a标签不能继承字体颜色color h标签不能继承font-weight b.strong不能继承font-weight i,em不能继承font-style 可继承的属性 font-size font-family font-style font-weight font line-height text-align text-indent color
强制继承
每个CSS属性都接受这些值inherit 表示强制继承”。
作用
恰当地使用继承可以简化代码,降低CSS样式的复杂性