<html>
<body>
<div class="container bfc">
<img class="left" width="100" height="100" src="https://img2.baidu.com/it/u=1395980100,2999837177&fm=253&fmt=auto&app=120&f=JPEG?w=1200&h=675"/>
<p>文字区域。。。。。。。。。。</p>
</div>
</body>
<style >
.container {
background-color: red;
}
.left {
float: left;
}
.bfc {
display: flex; // 触发bfc
}
</style>
</html>
触发BFC
最新推荐文章于 2024-07-29 15:37:55 发布