一个不浮动的div里嵌套多个浮动div,然后在不浮动的div下设置一个div。怎么实现div在不浮动div内。
<divstyle="width:80%;margin:0auto;background-color:#eee;"align="center"><divstyle="wi...
<div style="width: 80%; margin: 0 auto; background-color: #eee;"
align="center">
<div style="width: 95%; background-color:gray;">
<div
style="border:solid 1px; float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
"<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
</div>
<div > 展开
align="center">
<div style="width: 95%; background-color:gray;">
<div
style="border:solid 1px; float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
"<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
<div
style="float: left; width:150px; height: 200px; background-color:green;margin-left: 20px; margin-top: 20px;">
<br> <img src="" height="100px" width="100px"><br> <a
href="action">昵称</a><br> <a href="action">性别</a><br> <a
href="action">年龄</a><br> <a href="action">住址</a><br>
</div>
</div>
<div > 展开
展开全部
在浮动的DIV下添加一个<div style="clear:both;"></div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
clear:both
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
清除浮动:
clear:both
clear:both
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询