CSS实现等分布局的4种方式
<div class="in" style="background-color: pink;">4</div> </div> </div> </div>
CSS Code复制内容到剪贴板
<style> body,p{margin: 0;} .parent{ display: table; width: 100%; table-layout: fixed; } .child{ display: table-cell; height: 100px; } .child + .child{ padding-left: 20px; } </style>
XML/HTML Code复制内容到剪贴板
<div class="parent" style="background-color: lightgrey;"> <div class="child" style="background-color: blue;"> <div class="in" style="background-color: lightblue;">1</div> </div> <div class="child" style="background-color: green;"> <div class="in" style="background-color: lightgreen;">2</div> </div> <div class="child" style="background-color: orange;"> <div class="in" style="background-color: lightsalmon;">3</div> </div> (编辑:焦作站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |