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