9.13 伸缩盒布局

35 阅读1分钟
<!DOCTYPE html>
<html lang="en">
<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>
        .parent{
            width: 1090px;
            height: 38px;
            /* background-color: royalblue; */
            margin:  0 auto;
            display: flex;
            justify-content: space-between;
        }
        .parent>.left{
            width: 212px;
            height: 38px;
            background-color: red;

        }
        .parent>.center{
            width: 534px;
            height: 38px;
            background-color: pink;

        }
        .parent>.right{
            width: 134px;
            height: 38px;
            background-color: blueviolet;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="left"></div>
        <div class="center"></div>
        <div class="right"></div>
    </div>
</body>
</html>