在IE5.5、IE6、IE7、IE8beta1、FF、Opera9测试过,都可以,不知道在MAC上会不会有问题呢
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
.clearfix:after {}{
content: ".";
clear: both;
height: 0;
visibility: hidden;
display: block;
}
.clearfix{zoom:1}
html>/**/body .clearfix{overflow:hidden;}
</style>
</head>
<body>
<div class="clearfix" style="background:#666; padding:10px;"> <!-- float container -->
<div style="float:left; width:30%; height:40px;background:#EEE; ">Some Content</div>
</div>
</body>
</html>