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>

    
    
  • 相关阅读:
    react 样式继承 属性传递
    react css-in-js
    react 利用高阶组件给页面加上动画
    react路由过渡动画效果
    REACT列表过度
    react 过渡动画组件
    VueJs之计算属性
    VueJs之判断与循环
    VusJs之入门
    MYSQL之数据报表
  • 原文地址:https://www.cnblogs.com/sanerandm/p/9400020.html
Copyright © 2011-2022 走看看