码迷,mamicode.com
首页 > Web开发 > 详细

Html 页面布局

时间:2019-12-18 23:46:58      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:tle   lan   char   lang   pos   auto   页面布局   bsp   head   

例1: overflow的使用

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{margin:0;}
        .left{
            float: left;
        }
        .right{
            float: right;
        }
        .pg-header{
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background-color: #499ef3;
            height: 48px;
        }
        .pg-content .meun{
            position: fixed;
            top: 48px;
            left: 0;
            bottom: 0;
            width: 200px;
            background-color: #dddddd;
        }
        .pg-content .content{
            position: fixed;
            top: 48px;
            right: 0;
            bottom: 0;
            left: 200px;
            background-color: #b0b0b0;
            overflow: auto;
        }
    </style>
</head>
<body>
    <div class="pg-header"></div>
    <div class="pg-content">
        <div class="meun left">a</div>
        <div class="content left">
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
            <p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p><p>ddddd</p>
        </div>
    </div>
    <div class="pg-footer"></div>
</body>
</html>

 

Html 页面布局

标签:tle   lan   char   lang   pos   auto   页面布局   bsp   head   

原文地址:https://www.cnblogs.com/smile1/p/12064138.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!