<style>
.box{
200px;
height:200px;
background-color:pink;
/* padding-left:20px;*/
}
.damao2{
200px;
height:200px;
background-color:pink;
padding-left:20px;
padding-top:20px;
}
.damao{
background-color:purple;
height:200px;
padding-left:20px;/*内部加padding,(不加width属性,继承的父类的width)外部box不会撑开,因为内部盒子没有width
继承的上级盒子宽度*/
}
</style>
</head>
<body>
<div class="box" id="box">
<div class="damao">123</div>
</div>
<div class="damao2" id="2">
</div>
</body>