<style> /*BFC子元素不会被父级元素影响*/ .box{ display: inline-block; width: 100px; height: 100px; background-color: green; border-top: 1px solid red; } .box1{ width: 50px; height: 50px; margin-top: 20px; background-color: orange; } </style> <body> <div class="box"> <div class="box1"> </div> </div> </body>
02_BFC塌陷问题
最新推荐文章于 2024-10-02 23:39:00 发布