您好,欢迎来到刀刀网。
搜索
您的当前位置:首页两个弹性盒自适应屏幕宽度

两个弹性盒自适应屏幕宽度

来源:刀刀网
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
        }
        
        .flex-container {
            background-color: lightgrey;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
        }
        
        .flex-item {
            background-color: cornflowerblue;
            width: 300px;
            height: 100px;
            margin: 10px;
        }
    </style>
</head>

<body>

    <div class="flex-container">
        <div class="flex-item">flex item 1</div>
        <div class="flex-item">flex item 2</div>
    </div>

</body>

</html>

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- gamedaodao.com 版权所有 湘ICP备2022005869号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务