用margin实现两列布局中的自适应列

<div id="wrapper">
    <div id="col1">
      "fixed"
    </div>
    <div id="col2">
      "fluid"
    </div>
</div>
#wrapper{background:red;float:left;width:90%;height:200px;padding:5px}

#col1{
  float:left;
  width:100px;
  height:100%;
  background:green;
}
#col2{background:green;height:100%;margin-left:110px;margin-right:0px;}

http://jsfiddle.net/rhw0z1bj/

原文地址:https://www.cnblogs.com/zyip/p/5204011.html