上图:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>box-flex</title>
</head>
<body>
<style>
*{padding: 0;margin: 0}
.test_box {
width: 800px;
margin:0 auto;
text-align: center;
display: -moz-box;
display: -webkit-box;
display: box;
}
.list{height: 100px;color: #fff}
.list_one{
background: blue;
width: 200px;
}
.list_two {
background: red;
-moz-box-flex: 1;
-webkit-box-flex: 1;
box-flex: 1;
}
</style>
<div class="test_box">
<div class="list list_one">img</div>
<div class="list list_two">content</div>
</div>
</body>
</html>
更多相关信息:
http://www.zhangxinxu.com/wordpress/2010/12/css-box-flex属性,然后弹性盒子模型简介/