float问题
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>float</title>
<style type="text/css">
*{margin:0;padding:0;}
.div1{
position: absolute;width: 1903px;border: #000099 solid 1px;
}
.div2{border: #000099 solid 1px;height:364px;width:224px;float:left;position: fixed;top:0;left:1679px;right:0;bottom:0;margin: auto 0;}
.div3{border: #000099 solid 1px;height:364px;width:224px;float:right;position: fixed;top:0;left:0;right:0;bottom:0;margin: auto 0;}
</style>
</head>
<body>
<div class="div1">
<img src="http://img1.sycdn.imooc.com/climg//59c9f7ce0001839219034033.png"/>
<div class="div2"><img src="http://img1.sycdn.imooc.com/climg//5a3383c70001f1b702240364.png"/></div>
<div class="div3"><img src="http://img1.sycdn.imooc.com/climg//5a3383d00001a3dd02240364.png"/></div>
</div>
</body>
</html>
请问一下,给div2设置了float:left,div3设置了float:right,为啥不给div2或div3设置left值两个图片就会重合呢,按道理不是分开显示的么
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星