<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>弹性盒模型</title>
    <style type="text/css">
        .box{
            height:100px;
            border:10px solid #000;
            padding:10px;
            display:-webkit-box;
            
        }
        .box div:nth-of-type(1){-webkit-box-flex:1}
        .box div:nth-of-type(2){width:400px;}
        .box div:nth-of-type(3){-webkit-box-flex:1}
        
        .box div{
            width:100px;
            height:100px;
            background:red;
            border:1px solid #fff;
        }
    </style>
</head>
<body>
<div class="box">
    <div>1</div>
    <div>2</div>
    <div>3</div>
   

</div>
</body>
    <style type="text/css">
        .box{
            height:100px;
            border:10px solid #000;
            padding:10px;
            display:-webkit-box;
            
        }
        .box div:nth-of-type(1){-webkit-box-flex:1}
        .box div:nth-of-type(2){width:400px;}
        .box div:nth-of-type(3){-webkit-box-flex:1}
        
        .box div{
            width:100px;
            height:100px;
            background:red;
            border:1px solid #fff;
        }
    </style>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.