• 伸缩盒


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        
    </head>
    <body>
        <h2>横向伸缩:</h2>
        <div class="flex">
            <div class="left"></div>
            <div class="cent"></div>
            <div class="right"></div>
        </div>
        <style>
            .flex{ display: flex; height: 100px; border:1px solid #ccc;}
            .flex div{ 50px; height: 100px; border:1px solid #eee;}
            .flex .left{ flex:1;}
            .flex .cent{ flex:5;}
            .flex .right{ flex:1;}
        </style>
        <h2>纵向伸缩:</h2>
        <div class="v_flex">
            <div class="top"></div>
            <div class="mid"></div>
            <div class="bot"></div>
        </div>
        <style>
            .v_flex{ display: flex; flex-direction:column; height: 300px; margin-top:20px; border: 1px solid #ccc;}
            .v_flex div{ height: 50px; border:1px solid #eee;}
            .v_flex .mid{ flex: 1;}
    
        </style>
        
    </body>
    </html>
    

      

  • 相关阅读:
    Transformation
    Yet Another Number Sequence
    Table
    K个联通块
    Acyclic Organic Compounds
    Sandy and Nuts
    tetrahedron
    BZOJ4750 密码安全
    实现商品秒杀 时间倒计时
    实现qq登录
  • 原文地址:https://www.cnblogs.com/lstrive/p/10790272.html
Copyright © 2020-2023  润新知