如何实现外边框不合并呢?我总结了几个知乎大神和老师上课说的办法:
1.可以只设置下边距或者上边距:
<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>不合并</title>
<style>
*{margin:0;padding: 0;}
.first, .second, .third{height:100px;width:500px;padding: 20px;margin-bottom: 20px;}
.first{ background:#ccc;}
.second{ background:#FCC;}
.third{ background:#9CF;}
</style>
</head>
<body>
<div class="first">first</div>
<div class="second">second</div>
<div class="third">third</div>
</body>
2。