原文链接:http://blog.163.com/qqabc20082006@126/blog/static/22928525201031211212955/
测试用例:
<!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=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#wrapper{ 500px; background-color:#99CC00; overflow:hidden;}
#left{100px; height:100px; background-color:blue; float:left;}
#right{100px; height:100px;background-color:yellow; float:right;}
li{ overflow:hidden;}
</style>
</head>
<body>
<div id="wrapper">
<div id="left">left</div>
<div id="right">right</div>
</div>
<ul><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li></ul>
</body>
</html>