美文网首页
CSS盒子模型

CSS盒子模型

作者: 海客无心 | 来源:发表于2017-05-07 10:45 被阅读0次
    • 2D盒子模型由四个部分组成:
      • 外边距
      1. 内边距
      2. 边框
      3. 盒子中的内容
    • 3D盒子模型由五个部分组成
      • border(最上层)
      • content和padding(第二层)
      1. background-image(第三层)
        -----> 这就是背景图片掩盖背景颜色的原因
      2. background-color(第四层)
      3. 外边距margin(第五层)

    相关文章

      网友评论

          本文标题:CSS盒子模型

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