css哪些属性继承

问问题描述

css哪些属性继承,这个怎么解决啊?快急疯了?

答精选答案

最佳答案

在CSS中,以下属性是可以被继承的:

1. 字体系列属性

`font`

`font-family`

`font-size`

`font-style`

`font-weight`

`font-variant`

`font-stretch`

`font-size-adjust`

2. 文本系列属性

`text-align`

`text-indent`

`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. 生成内容属性

`quotes`

7. 光标属性

`cursor`

8. 页面样式属性

`page`

`page-break-inside`

`orphans`

9. 声音样式属性

`speak`

`speak-punctuation`

`speak-numeral`

`speak-header`

`speech-rate`

`volume`

`voice-family`

`pitch`

`pitch-range`

`stress`

`richness`

`azimuth`

`elevation`

请注意,并非所有CSS属性都可以被继承,例如`display`、`width`、`height`等属于不可继承属性

本文来自作者[灵心心理]投稿,不代表公众科技网立场,如若转载,请注明出处:https://www.cpst.net.cn/miaozhi/4692147.html

赞 (0)

发表回复

本站作者后才能评论

评论列表(4条)

  • 灵心心理
    灵心心理 2026年10月06日

    我是公众科技网的签约作者“灵心心理”!

  • 灵心心理
    灵心心理 2026年10月06日

    希望本篇文章《css哪些属性继承》能对你有所帮助!

  • 灵心心理
    灵心心理 2026年10月06日

    本站[公众科技网]内容主要涵盖:教育咨询,知识百科

  • 灵心心理
    灵心心理 2026年10月06日

    本文概览:在CSS中,以下属性是可以被继承的:1. 字体系列属性 `font` `font-family` `font-size` `font-style` `font-weight` `font-variant` `font-stretch` `font-size-adjust`2. 文本系列属性 `text-align` `text-indent` `line-height` `word-spacing` `letter-spacing` `text-transform` `direction` `color`

联系我们

联系:143 0457 151

工作时间:周一至周五,9:30-18:30,节假日休息

关注我们