css類比表格效果

來源:互聯網
上載者:User

 

  1. 類比表格效果,在IE6,IE7,IE8,firefox,Opera下測試通過

    雖然不推薦用這種方式來類比表格,但是確實可以做到.

  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
  3. <
    html
     xmlns
    ="http://www.w3.org/1999/xhtml"
    >
      
  4. <
    head
    >
      
  5. <
    meta
     http-equiv
    ="Content-Type"
     content
    ="text/html; charset=utf-8"
     />
      
  6. <
    title
    >
    DIV+CSS類比表格效果 - by koyoz.com</
    title
    >
      
  7. <
    style
     type
    ="text/css"
    >
      
  8. * {margin:0;padding:0}   
  9. #main {margin:100px 0 0 200px}   
  10. #main ul {width:520px;height:165px;list-style:none}   
  11. #main li {border-left:1px solid #ccc;border-top:1px solid #ccc;float:left;width:102px;height:33px;text-align:center;line-height:33px}   
  12. #main li.b {border-bottom:1px solid #ccc}   
  13. #main li.r {border-right:1px solid #ccc}   
  14. </
    style
    >
      
  15. </
    head
    >
      
  16.   
  17. <
    body
    >
      
  18.     <
    div
     id
    ="main"
    >
      
  19.         <
    ul
    >
      
  20.             <
    li
    >
    11</
    li
    >
      
  21.             <
    li
    >
    11</
    li
    >
      
  22.             <
    li
    >
    11</
    li
    >
      
  23.             <
    li
    >
    11</
    li
    >
      
  24.             <
    li
     class
    ="r"
    >
    11</
    li
    >
      
  25.             <
    li
    >
    </
    li
    >
      
  26.             <
    li
    >
    </
    li
    >
      
  27.             <
    li
    >
    </
    li
    >
      
  28.             <
    li
    >
    </
    li
    >
      
  29.             <
    li
     class
    ="r"
    >
    11</
    li
    >
      
  30.             <
    li
    >
    </
    li
    >
      
  31.             <
    li
    >
    </
    li
    >
      
  32.             <
    li
    >
    </
    li
    >
      
  33.             <
    li
    >
    </
    li
    >
      
  34.             <
    li
     class
    ="r"
    >
    11</
    li
    >
      
  35.             <
    li
    >
    </
    li
    >
      
  36.             <
    li
    >
    </
    li
    >
      
  37.             <
    li
    >
    </
    li
    >
      
  38.             <
    li
    >
    </
    li
    >
      
  39.             <
    li
     class
    ="r"
    >
    11</
    li
    >
      
  40.             <
    li
     class
    ="b"
    >
    </
    li
    >
      
  41.             <
    li
     class
    ="b"
    >
    </
    li
    >
      
  42.             <
    li
     class
    ="b"
    >
    </
    li
    >
      
  43.             <
    li
     class
    ="b"
    >
    </
    li
    >
      
  44.             <
    li
     class
    ="b r"
    >
    11</
    li
    >
      
  45.         </
    ul
    >
      
  46.     </
    div
    >
      
  47. </
    body
    >
      
  48. </
    html
    >

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.