里面的两个div长宽设置成一样的,都float不就上下对齐了吗,还是有什么特殊要求?
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.wrap{width:100%height:500pxbackground: redfloat:left}
.wrap div:nth-child(1){width:200pxheight:200pxbackground: yellowfloat: left}
.wrap div:nth-child(2){width:200pxheight:200pxbackground: bluefloat: left}
</style>
</head>
<body>
<div class="wrap">
<div></div>
<div></div>
</div>
</body>
</html>