div左边固定宽度,右边自适应宽度

样式:

<style type="text/css">
  html,body { height: 100%; padding: 0; margin: 0; }
  .outer { height: 100%;  box-sizing: border-box ; position: relative; }
  .A { height: 100px; background: #BBE8F2;  200px;float: left; }
  .B { height: 100px; background: #D9C666; overflow: hidden;}
</style>

 html:

<div class="outer">
    <div class="A"> 左边DIV </div>
    <div class="B">右边DIV </div>
</div>

 

效果:

原文地址:https://www.cnblogs.com/wangyunhui/p/10370764.html