css学习2

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="css盒模型.css">
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>

</div>
<div>

</div>
</body>
</html>
css样式
div:first-child{
width:200px;
height:200px;
background-color: pink;
box-sizing: content-box;
/* 就是以前的盒模型 w3c*/
padding: 10px;
border:15px solid red;
}
div:last-child{
width:200px;
height: 200px;
background-color: purple;
padding: 10px;
box-sizing: border-box;
border: 15px solid red;
}
/*现在新的盒模型*/
posted @ 2019-11-30 00:20  菜鸟不忘初心  阅读(129)  评论(0编辑  收藏  举报