web学习里面那个float:left不能实现左浮效果,以下是代码实现。

发布网友

我来回答

1个回答

热心网友

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<body>
<div style="width:800px;height:500px; background-color:black">
这是外部容器
<div style="width:300px;height:400px; background-color:red;float:left;">
这是 左侧容器
</div>
<div style="width:400px;height:450px; background-color:yellow;float:left;">
这是左侧浮动后贴过来的容器
</div>
</div>
</body>
</html>
//纯手打 采纳

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com