首页 > Web开发 > 详细

css九宫格

时间:2017-08-24 14:27:47      阅读:242      评论:0      收藏:0      [点我收藏+]

 <style type="text/css">
   li {
    width: 100%;
    float: left;
   }
   li:first-child:nth-last-child(2),
   li:first-child:nth-last-child(2)~li,li:first-child:nth-last-child(4),
   li:first-child:nth-last-child(4)~li {
    width: 50%;
   }
   li:first-child:nth-last-child(3),
   li:first-child:nth-last-child(3)~li,li:first-child:nth-last-child(5),
   li:first-child:nth-last-child(5)~li,li:first-child:nth-last-child(6),
   li:first-child:nth-last-child(6)~li,li:first-child:nth-last-child(7),
   li:first-child:nth-last-child(7)~li,li:first-child:nth-last-child(8),
   li:first-child:nth-last-child(8)~li,li:first-child:nth-last-child(9),
   li:first-child:nth-last-child(9)~li {
    width: 33%;
   }
  </style>

  <ul>
   <li>1</li>
  </ul>

css九宫格

原文:http://www.cnblogs.com/mrt-yyy/p/7422825.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!