盒模型问题

一个有宽度 高度 和padding 以及border的盒子到底有多大

答:宽度 加padding 加border 的总和

验证代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .test{
            width: 100px;
            height: 100px;
            padding: 20px;
            border-style: solid;
            border-width: 10px;
            border-color: blue;
            color: pink;
            background-color: aqua;
            margin: 30px;
        }
    </style>
</head>
<body>
    <div class="test">1</div>
    <script>
        let people={
            name:'tom',
            age:19,
            job:{
                one:'studernt',
                two:'more'
            }
        }
        let arr=[1,2,3]
        console.log(...arr)
    </script>
</body>
</html>

 

posted @ 2023-02-28 10:06  小白字太白  阅读(15)  评论(0)    收藏  举报