三列布局

Posted 冰域

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了三列布局相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        body{margin: 0;padding: 0}
       .left{width: 200px;height: 500px;background: #ccc;position:absolute;left:0;top: 0}
       .middle{height: 500px;background: red;}
       .right{width: 300px;height: 500px;background: #ddd;position: absolute;right: 0;top:0;}
    </style>
</head>
        <div class="left">ss</div>
        <div class="middle"></div>
        <div class="right">dd</div>
</body>
</html>

 

用绝对定位,中间一块自适应宽度

以上是关于三列布局的主要内容,如果未能解决你的问题,请参考以下文章