元素宽度在不设置的情况下,是它本身父容器的100%
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css">
.box {
background: #F00;
height: 12px;
width: 12px;
}
</style>
</head>
<body>
<div class="box">
<div class="box1">1111111111</div>
</div>
</body>
</html>
设置了父容器的宽度,子容器未设置。但是子容器还是超过了父容器宽度的100%
zhanbao