div+css中的一个float浮动问题!
<html><head><title>无标题文档</title><styletype="text/css">body{background:green;margin:0}...
<html>
<head>
<title>无标题文档</title>
<style type="text/css">
body{ background:green; margin:0}
#left{ width:600px; height:700px; float:left} 为什么这个不写float:left,那么最后个区块黄色的在右下?
#one{
float:left;
width:200px;
height:200px;
background:red;
}
#two{ float:right;
width:200px;
height:200px;
background:#0066CC;
}
#three{
width:200px;
height:200px;
float:right;
background:yellow;
}
</style>
</head>
<body>
<div id="left">
<div id="one">
</div>
<div id="two"></div>
</div>
<div id="three"></div>
</body>
</html> 展开
<head>
<title>无标题文档</title>
<style type="text/css">
body{ background:green; margin:0}
#left{ width:600px; height:700px; float:left} 为什么这个不写float:left,那么最后个区块黄色的在右下?
#one{
float:left;
width:200px;
height:200px;
background:red;
}
#two{ float:right;
width:200px;
height:200px;
background:#0066CC;
}
#three{
width:200px;
height:200px;
float:right;
background:yellow;
}
</style>
</head>
<body>
<div id="left">
<div id="one">
</div>
<div id="two"></div>
</div>
<div id="three"></div>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询