01-内边距
<!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>盒子模型之内边距</title>
<style>
div {
width: 200px;
height: 200px;
background-color: pink;
padding-left: 20px;
padding-top: 30px;
}
</style>
</head>
<body>
<div>
盒子内容是content盒子内容是content盒子内容是content盒子内容是content
</div>
</body>
</html>
效果展示
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/aeb97267ef6f23c48e1c8e902b9472cd.jpeg#pic_center)
02-内边距复合写法
<!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>内边距复合写法</title>
<style>
div {
width: 200px;
height: 200px;
background-color: pink;
padding: 5px 10px 20px 30px;
}
</style>
</head>
<body>
<div>盒子内容是content盒子内容是content盒子内容是content盒子内容是content</div>
</body>
</html>
效果展示
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/188cee4c18f79f1859e67c0d5822d928.jpeg#pic_center)