box-flex 分割

<!DOCTYPE html>
<html>
<head>
<style> 
.box{  300px; height: 100px; background-color: red; display: -webkit-box; display: -moz-box; display: box;}
.siblings-left{ -webkit-box-flex: 4; -moz-box-flex: 4; box-flex: 4; background-color: green;}
.siblings-right{ -webkit-box-flex: 2; -moz-box-flex: 2; box-flex: 2; background-color: blue;}
</style>
</head>
<body>
<div class="box">
    <div class="siblings-left"></div>
    <div class="siblings-right"></div>
</div>
</body>
</html>

均分,高版本可代替float

IE高低版本据不支持

原文地址:https://www.cnblogs.com/jiangtuzi/p/4530919.html