美文网首页
CSS 中哪些属性可继承,哪些不可以?

CSS 中哪些属性可继承,哪些不可以?

作者: 李小白呀 | 来源:发表于2021-02-05 23:38 被阅读0次

    能继承的属性

    1. 字体系列属性:font、font-family、font-weight、font-size、font-style;
    2. 文本系列属性:
      2.1)内联元素:color、line-height、word-spacing、letter-spacing、
      text-transform;
      2.2)块级元素:text-indent、text-align;
    3. 元素可见性:visibility
    4. 表格布局属性:caption-side、border-collapse、border-spacing、empty-cells、
      table-layout;
    5. 列表布局属性:list-style
      不能继承的属性
    6. display:规定元素应该生成的框的类型;
    7. 文本属性:vertical-align、text-decoration;
    8. 盒子模型的属性:width、height、margin 、border、padding;
    9. 背景属性:background、background-color、background-image;
    10. 定位属性:float、clear、position、top、right、bottom、left、min-width、
      min-height、max-width、max-height、overflow、clip;

    相关文章

      网友评论

          本文标题:CSS 中哪些属性可继承,哪些不可以?

          本文链接:https://www.haomeiwen.com/subject/lnlntltx.html