zoukankan      html  css  js  c++  java
  • css九宫格布局

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>09sudoku</title>
    <style type="text/css">
    *{
    font-size: 12px;
    padding:0px;
    margin:0px;
    }
    ul,ul li{
    list-style: none;
    }
    ul.wrap {
    300px;
    margin:200px auto;
    display: flex;
    flex-wrap:wrap;
    }
    ul.wrap li{
    100px;
    height: 100px;
    line-height: 100px;
    text-align: center;
    border:1px solid #ccc;
    margin-left:-1px;
    margin-top:-1px;
    box-sizing:border-box;

    }
    ul.wrap li:nth-child(3n+1){
    margin-left:0px;
    }
    ul.wrap li:nth-child(1),ul.wrap li:nth-child(2),ul.wrap li:nth-child(3){
    margin-top: 0px;
    }
    ul.wrap li:hover{
    border-color: red;
    z-index: 2;
    }
    </style>
    </head>
    <body>
    <ul class="wrap">
    <li class="box">1</li>
    <li class="box">2</li>
    <li class="box">3</li>
    <li class="box">4</li>
    <li class="box">5</li>
    <li class="box">6</li>
    <li class="box">7</li>
    <li class="box">8</li>
    <li class="box">9</li>
    </ul>
    <script type="text/javascript">

    </script>
    </body>
    </html>

    
    
  • 相关阅读:
    感悟.
    近期感悟
    android 新建项目无法自动生成R文件
    重装后各种碰壁
    rhapsody
    libevent
    ui android需要解决的问题
    sql对xml的解析
    将datarow转换为实体的方法
    网页中的一些我不熟的东西
  • 原文地址:https://www.cnblogs.com/sanerandm/p/9400020.html
Copyright © 2011-2022 走看看