我在 IE6 和 ie7 中有一个 float 问题:
<!DOCTYPE html>
<html>
<head>
<title>lily</title>
<style>
div{width: 100px; height: 100px;}
.div1{background: red; float: left;}
.div2{background: yellow;}
</style>
</head>
<body>
<div class="div1">div1</div>
<div class="div2">div2</div>
</body>
</html>
为什么在IE6&&IE7和Chrome中显示不一样?以及在ie6&ie7中如何解决?
:
最佳答案
<!DOCTYPE html>
<html>
<head>
<title>lily</title>
<style>
div{width: 100px; height: 100px;}
.div1{background: red; float: left;}
.div2{background: yellow; clear:both;}
</style>
</head>
<body>
<div class="div1">div1</div>
<div class="div2">div2</div>
</body>
关于ie6 和 ie7 中的 css float 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20320458/