布局二:左边固定右边自适应

江枫思渺然 提交于 2019-12-19 06:53:09

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>左边固定右边自适应</title>
    <style type="text/css">
     .out{
        width: 90%;
        margin: 0 auto;
        height: 300px;
        /*background: yellow;*/
        position: relative;
       }
     .left{
        width: 200px;
        background: rgba(255,0,0,0.5);
        height: 200px;
        /*float: left;*/
        position: absolute;
        left: 0;
        top: 0;
      }
     .right{
        height: 500px;
        background: blue;
        margin-left: 200px;
        /*float: right;*/
      }
    </style>
  </head>
  <body>
    <div class="out">
      <div class="left"></div>
      <div class="right">你可能遭遇了毒手的攻击和背叛,这导致了我们无法开展调查,内容随便写的只是为了看看效果是怎么样子的。布局分布分多种。常见的需要了解 才能开展工作。</div>
    </div>
  </body>
</html>

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!