1.盒子模型
盒子模型主要以,边框,边距,填充和实际内容
margin(内边距)————清除边框外的区域,外边框是透明的
padding(外边距)————清除内容周围的区域,内边距不是透明的
border(边框)————围绕在内边距和内容外的边框
content(内容)————盒子的内容,显示文本和图像的
<body>
<div class="divOne">内容有很多</div>
</body>
<head>
<style>
.divOne{
width: 300px;
height: 300px;
background-color: aqua;
/* margin(内边距)————清除边框外的区域,外边框是透明的 */
padding: 25px;
/* padding(外边距)————清除内容周围的区域,内边距不是透明的 */
margin: 25px;
/* border(边框)————围绕在内边距和内容外的边框 */
border: 10px solid red;
color: white;
}
</style>
</head>