<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>li或div高度不同产生错位的解决办法</title>
<style>
.test{ margin:0; padding:0; list-style:none; width:500px;}
.test li{ padding:5px; min-height:20px; max-height:40px; min-width:40px; max-width:200px; margin:5px; border:1px solid #999; background:#CCC; font-size:12px; margin:5px; vertical-align:top; overflow:hidden; float:left; }
</style>
</style>
</head> <body>
<ul class="test">
<li>When Brazil needed him most, Neymar, the face of this World Cup</li>
<li>What's happening? And why?</li>
<li>Brazil sneaks nervy win</li>
<li>Where did ISIS come from, and how did they become the world's most dangerous militants?</li>
<li>How the day's action unfolded</li>
<li>Join World Cup chat</li>
</ul>
</body>
</html> 效果如下:

