zoukankan      html  css  js  c++  java
  • CSS3:box-sizing 怪异盒模型

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>盒子模型</title>
        <link rel="stylesheet" href="style/box.css">
    </head>
    <body>
    
    
    标准盒模型
    <hr />
        <div class="bag">
            <div class="shoes_box">
                <div class="shoes">
            鞋子
        </div>
        </div>
        </div>
        
    怪异盒模型
    <hr />
        <div class="bag1">
            <div class="shoes_box1">
                <div class="shoes1">
            鞋子
        </div>
        </div>
        </div>
    
    </body>
    </html>
    /*盒子模型*/
    .shoes{
        width: 100px;
        height: 100px;
        background: #F69A0B;
        text-align: center;line-height: 100px;
        color: #fff;
    }
    
    .shoes_box{
        padding: 10px;
        width: 100px;
        height: 100px;
        background: #FE6403;
        border: 5px solid #02C3F5;
    }
    .bag{
        width: 130px;
        height: 130px;
        margin:100px;
    }
    
    
    /*怪异盒模型*/
    .shoes1{
        width: 100px;
        height: 100px;
        background: #F69A0B;
        text-align: center;line-height: 100px;
        color: #fff;
    }
    
    .shoes_box1{
        padding: 10px;
        width: 130px;
        height: 130px;
        background: #FE6403;
        border: 5px solid #02C3F5;
        box-sizing:border-box;
    }
    .bag1{
        width: 130px;
        height: 130px;
        margin:100px;
    }

     

  • 相关阅读:
    spring cloud项目搭建
    获取iframe的window对象
    数学杂谈 #7
    [AGC023D] Go Home
    JOISC 2021 部分题解
    [NOI2017]泳池
    [NOI2016] 循环之美
    [NOI2016] 优秀的拆分
    [LG P3676]小清新数据结构题
    [ARC113F]Social Distance
  • 原文地址:https://www.cnblogs.com/tinyphp/p/4765701.html
Copyright © 2011-2022 走看看