SOURCE

console 命令行工具 X clear

                    
>
console
  <div id="main">
        <div id="div1"></div>
        <div id="div2"></div>
        <div id="div3"></div>
        <div id="div4"></div>
    </div>
       #main {
            display: flex;
            border: 1px solid black;    
            width: 400px;
            height: 300px;
        }

        #div1 {
            width: 70px;
            height: 70px;
            background-color: pink;
            flex-basis:40px;  /*该行取代width,所以div1宽度与其他不一样*/
        }

        #div2 {
            width: 70px;
            height: 70px;
            background-color: orange;
        }

        #div3 {
            width: 70px;
            height: 70px;
            background-color: green;
        }

        #div4 {
            width: 70px;
            height: 70px;
            background-color: yellow;
        }