- <!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>test</title>
- <style type="text/css">
- *{margin:0;
- padding;0;}
- span{background:#fdb48c;}
- .warp{background:#666;
- border:#000000 1px solid}
- .warp ul{display:block; background:#ccc; list-style:none; margin:10px; padding:0px;}
- </style>
- </head>
- <body>
- <span> begin begin begin </span>
- <div class="warp">
- <ul>
- <li>text text</li>
- <li>text text</li>
- <li>text text</li>
- <li>text text</li>
- <li>text text</li>
- </ul>
- </div>
- <span> end end end end </span>
- </body>
- </html>
复制代码
给wrap加上边框可以解决这问题,,不过建议把ul:margin改为wrap:padding,,,更佳