flex_宽度补全

宽度40px,另一个的补全宽度:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        html,body,.box{
            height:100%;
        }
        body{
            margin:0;

        }
        .box{
            display:-webkit-flex;
            -webkit-flex-direction: row;
            display:flex;
            flex-direction:row;
        }
        .box .child{
            width:40px;
            background:#f00;
        }
        .box .child1{
            flex:1;
            background:#0f0
        }
    </style>
</head>
<body>
<div class="box">
    <div class="child">child</div>
    <div class="child1">child1</div>
</div>
</body>
</html>
原文地址:https://www.cnblogs.com/wang715100018066/p/6018921.html