关于float的一些问题 财富值10

2016-10-12 17:25发布

如下图的效果如何实现:

#div4{     width: 180px;     height: 60px; }  
<div class="wrap" id="div4">              <div id="div1">容器1;</div>             <div id="div2">容器2;</div>             <div id="div3">容器3;</div>             <p>效果3</p>         </div>
付费偷看设置
发送
1条回答
淘修车网 - 这个人很懒,什么都没留下
1楼 · 2016-10-12 17:30.采纳回答

<div style="width:180px;height:60px;position:relative;">
<div style="width:90px;height:30px;float:left;background:#F00;">
</div>
<div style="width:90px;height:30px;clear:both;float:left;background:#00F;">
</div>
<div style="width:90px;height:30px;position:absolute;top:0;right:0;background:#0F0;">
</div>
<p style="clear:both;text-align:center;">效果3</p>
</div>

一周热门 更多>