<div style="border:solid 1px #000; width:200px; height:100px;">
<div style="float:left; width:50%; height:100px;">
<div style="width:100%;height:50%;">左1行</div>
<div style="width:100%;height:50%;">
<div style="float:left; width:90%;height:100%; background-color:#36C; position:relative; "></div>
<div style="float:right; width:5px;height:100%; display:block; background-color:#0F0; position:relative;">g</div>
</div>
</div>
<div style="float:right; width:50%; height:100px; ">
<div style="width:100%;height:70%;">左1行</div>
<div style="width:100%;height:30%;">
<div style="float:left; width:90%;height:100%; background-color:#36C; position:relative; "></div>
<div style="float:right; width:5px;height:100%; display:block; background-color:#0F0; position:relative;">g</div>
</div>
</div>
</div>div css 布局为表格效果
最新推荐文章于 2024-12-26 12:07:08 发布
本文深入探讨了网页布局设计的核心技巧,通过实例展示了如何利用CSS实现复杂的布局效果,包括浮动元素、相对定位和背景颜色的运用。

3万+

被折叠的 条评论
为什么被折叠?



