padding的百分比

 

<!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>
        .father {
            width: 100px;
            height: 100px;
            background-color: #ccc;
        }
        
        .son {
            padding: 10% 0;
            /* width: 30px;
            height: 30px; */
            background-color: pink;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son" style="padding: 5% 0;">
            <!-- <p>hello</p> -->
        </div>
    </div>
</body>

</html>

表现出来的:

padding是内边距。内边距是外面容器的百分之几。

 

 

 

 

别人付出足够努力,专心,才有的成果。知道什么重要,什么不重要。年龄不代表任何。人生经历决定一个人的样子。尊重。只要求自己。都是年龄相近的人。

独立完成作业,自己研究的才是自己理解的,自己的知识。幸福感。温暖,包容。接受,面对,解决。温柔的人能让对方也变得温柔。还是要强大。强大的人自然温柔有力量。

 

posted on 2023-01-10 18:15  xiaoluoke  阅读(37)  评论(0编辑  收藏  举报

导航