<!DOCTYPE html>
<html>
<head>
<meta charest="utf-8">
<title>解决外边距溢出</title>
<style>
#d1,d2{
width:200px;
height:200px;
background:red;
}
#d2{
background:green;
}
#d3{
width:100px;
height:100px;
background:blue;
}
#d2:before{
concent:""
display:table
}
</style>
</head>
<body>
<div id="d1"> </div>
<div id="d2">
<!--
1.d2的第一个子元素
2.放一个table元素
-->
<div id="d3">
</div>
</body>
</html>