CSS样式中有些是可以被子节点继承的,有些却不能,下面就让我们来聊聊都有些啥,欢迎补充,谢谢。
可继承的css属性
1、字体属性:
font:组合字体
font-family:字体系列
font-size:字体大小
font-weight:字体粗细
font-style:字体风格
font-variant:小写转大写
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-type、list-style-image、list-style-position、list-style
6、生成内容属性:qoutes
7、光标属性:cursor
8、页面样式属性:page、page-break-inside、windows、orphans
9、声音样式属性:speak、speak-punctuation、speak-header、spea-numeral、speech-rate、volume、voice-family、pitch、pitch-range、stress、richness、azimuth、elevation