| 
 | 
 
 
发表于 2013-11-22 15:25:13
|
显示全部楼层
 
 
 
 本帖最后由 dvbhack 于 2013-11-22 17:10 编辑  
 
我顺手写了一段,demo在这里:http://www.ofcss.com/cssdemo/simple.html- <!DOCTYPE html>
 
 - <html>
 
 - <head>
 
 -   <meta charset="gbk">
 
 -   <meta http-equiv="X-UA-Compatible" content="IE=edge">
 
 -   <title></title>
 
 -   <style>
 
 - body,div,ul,li,img,a {margin:0;}
 
 - ul {padding:0;list-style:none;}
 
 - a img {border:0 none;}
 
 - .wrap:before,
 
 - .wrap:after {
 
 -     display:block;
 
 -     content:'';
 
 -     height:0 !important;
 
 -     line-height:0 !important;
 
 -     visibility:hidden;
 
 - }
 
 - .wrap:after { clear:both;}
 
 - .wrap {width:980px;margin:0 auto;*zoom:1;}
 
 - .pics {
 
 -     float:left;
 
 -     width:340px;
 
 -     height:90px;
 
 -     overflow:hidden;
 
 -     _margin-right:-3px;
 
 - }
 
 - .script {
 
 -     width:640px;
 
 -     height:90px;
 
 -     overflow:hidden;
 
 -     *zoom:1;
 
 -     background:#c00;
 
 - }
 
 - .pic {
 
 -     float:left;
 
 -     margin:0 10px 10px 0;
 
 -     width:160px;
 
 -     height:40px;
 
 - }
 
 - </style>
 
 - </head>
 
 - <body>
 
  
- <div class="wrap">
 
 -     <ul class="pics">
 
 -         <li class="pic">
 
 -             <a ><img src="http://fpoimg.com/160x40" width="160" height="40" alt=""></a>
 
 -         </li>
 
 -         <li class="pic">
 
 -             <a ><img src="http://fpoimg.com/160x40" width="160" height="40" alt=""></a>
 
 -         </li>
 
 -         <li class="pic">
 
 -             <a ><img src="http://fpoimg.com/160x40" width="160" height="40" alt=""></a>
 
 -         </li>
 
 -         <li class="pic">
 
 -             <a ><img src="http://fpoimg.com/160x40" width="160" height="40" alt=""></a>
 
 -         </li>
 
 -     </ul>
 
 -     <div class="script">
 
 -         <script>document.write('这段文字由js插入');</script>
 
 -     </div>
 
 - </div>
 
 - </body>
 
 - </html>
 
  复制代码 |   
 
 
 
 |