- 给父元素设置背景颜色属性不起作用
- 给父元素设置边框 border属性没有被撑开
- 给父元素设置内边距 padding属性也没有被撑开
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.box{
border: 10px solid red;
background-color: aqua;
padding: 10px;
}
.left,.right{
width: 200px;
height: 200px;
float: left;
}
.left{
background-color: #7FFF00;
}
.right{
background-color: #FF7F50;
}
</style>
</head>
<body>
<div class="box">
<div class="left"></div>
<div class="right"></div>
</div>
</body>
</html>
