flex

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>菜鸟教程(runoob.com)</title>
<style> 
#main
{
    width:220px;
    height:300px;
    border:1px solid black;
    display:flex;
}

#main .a
{
    width:150px;
    flex:none;
}
#main .b
{
    flex:1;
}
</style>
</head>
<body>

<div id="main">
  <div class='a' style="background-color:coral;">红色</div>
  <div class='b' style="background-color:lightblue;">蓝色</div>  
 
</div>

<p><b>注意:</b> Internet Explorer 9 及更早版本不支持 flex 属性。</p>
<p><b>注意:</b> Internet Explorer 10 通过 -ms-flex 属性来支持。 IE11 及更新版本完全支持 flex 属性 (不需要 -ms- 前缀)。</p>
<p><b>注意:</b> Safari 6.1 (及更新浏览器) 通过 -webkit-flex 属性支持。</p>

</body>
.container{  
        width:1000px;height:400px;border:1px solid red;  
        display:table;         /*table布局*/  
    }  
    .left{  
        width:200px; height:100%;background:gray;  
        display:table-cell;  
    }  
    .right{  
        height:100%;background:green;  
        display: table-cell;  
    } 
原文地址:https://www.cnblogs.com/-CLAY-/p/flex.html