css中那些属性可以被继承


主要的有:

字体相关: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

注意:背景相关的属性是不会被继承的哦。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM