请问老师为什么
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
padding: 0;
margin:0;
}
three{
width: 600px;
height: 600px;
}
.one{
width:500px;
height: 500px;
background-color: blue;
}
.one,.two,.t1{
float:left;
}
.two{
clear:right;
background-color: red;
}
</style>
</head>
<body>
<div class="three">
<div class="one">我是标题</div>
<div class="two">我是主体</div>
<div class="t1">我是主体1</div>
</div>
</body>
请问老师为什么我不是明明设置了 .two清除右边。为什么two的右边还是有浮动元素存在?16
收起
正在回答
3回答
那也得有元素设置右浮动啊
相似问题
登录后可查看更多问答,登录/注册
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星