css把多个块强制在一行显示
<!DOCTYPE> <html> <head> <title></title> <style type="text/css"> * { margin:0; padding:0; list-style:none;} .div { width:300px; margin:0 auto; background:#000; overflow:auto;} .div:after{ content:"."; display:block; height:0; clear:both; visibility:hidden;} .con { margin-left:-30000px; left:30000px; position:relative; float:left;} ul { width:100px; height:50px; background:#f60; float:left; margin-left:10px;} </style> </head> <body> <div class="div"> <div class="con"> <ul> <li>1</li> <li>2</li> </ul> <ul> <li>1</li> <li>2</li> </ul> <ul> <li>1</li> <li>2</li> </ul> </div> </div> </body> </html>