html结构左固定,右自适应

来源:互联网 发布:苹果密码破解软件 编辑:程序博客网 时间:2024/06/05 17:43
<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <style type="text/css">
    html, body {margin: 0;padding: 0;}
    .all{ width:100%; height:100%;}
    .left{ width:100px; float:left; background:#990; height:100%;margin-left: -100%;}
    .right{ width:100%; background:#F90; height:100%; float:left;}
    .right_in{ margin-left:100px; height:100%; }

  </style>
<div class="all">
    <div class="right">
        <div class="right_in"> 内容</div>
    </div>
    <div class="left">我是固定的</div>
</div>
</body>
</html>
0 0
原创粉丝点击