CSS中哪些属性可以被继承

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

 

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值