<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>弹性盒子布局flex, box-sizing: border-box</title>

<meta name="keywords" content="积分商城、兑换,春游兑换季,免费"/>

<meta name="description" content="积分春游兑换季,更多车主出行超值商品免费兑换"/>

<meta http-equiv="content-language" content="zh-cn" />

<meta http-equiv="x-ua-compatible" content="ie=emulateie7" />

<meta name="copyright" content="本页版权归iicoo所有。All Rights Reserved" />

<meta name="author" content="iicoo" />

<meta content="yes" name="apple-mobile-web-app-capable" />

<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />

<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style" />

<meta content="telephone=no" name="format-detection" />


<style type="text/css">

*{margin: 0; padding: 0;}

input{color:inherit;font:inherit;  -webkit-box-flex: 1;box-flex: 1;-webkit-appearance: none;-webkit-tap-highlight-color: rgba(255,0,0,0); box-sizing: border-box; display: block;}

html {

  height: 100%;

.main{padding: 10px;}

.box {

  display: -webkit-box;

  display: box;

  display: flex;

  display: -webkit-flex;

  background-color: #dbdbdb;

  height: 36px;

  padding: 10px 2px;

}  

.l{width: 110px; height: 36px;}

.l input,.r input{width: 100%;line-height: 36px;border: 1px solid #ccc;box-sizing: border-box;}

.r{-webkit-box-flex: 1;-ms-flex:1; flex:1;padding-left: 5px;}

.r2 input{line-height: 36px;}

.r2{width: 100%}

</style>

<script type="text/javascript">

 //

</script>

</head>

<body>

    <div class="main">

        <div class="box">

            <div class="l"><input type="text" placeholder="请输入关键字1" /></div>

            <div class="r"><input type="text" placeholder="请输入关键字2" /></div>

        </div>

        <div class="box"><div class="r2"><input style="width:100%;border: 1px solid #ccc;" type="text" placeholder="请输入关键字2" /></div></div>

    </div> 

</body>

</html>