• [css]后台管理系统布局


    知识点:

    绝对定位+overflowhidden

    整体思路

     

    三大块

    pg-header---需要固定 (height:48px)

    pg-content

    menu 右侧菜单-需要固定(200px; top:48;left:0; bottom:0;)
    
    content---当内容较多时候需要有滚动条(top:48;left:200px;right:0; bottom:0; overflow: auto;)

    pg-footer

    关键技术:

    position绝对定位

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>后台管理</title>
        <style>
            .fl {
                float: left;
            }
    
            .fr {
                float: right;
            }
    
            body {
                margin: 0;
            }
    
            .pg-header {
                margin: 0 auto;
                height: 48px;
                background-color: black;
            }
    
            .pg-content .menu {
                width: 200px;
                position: fixed;
                top: 48px;
                left: 0;
                bottom: 0;
                background-color: bisque;
            }
    
            .pg-content .content {
                position:
    fixed
    ; top: 48px; left: 200px; right: 0; bottom: 0; overflow: auto; } </style> </head> <body> <div class="pg-header"></div> <div class="pg-content"> <div class="menu fl">a</div> <div class="content fr"> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> <p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p><p>hi cristna</p> </div> </div> <div class="pg-footer"></div> </body> </html>
  • 相关阅读:
    Git 远程仓库 git remote
    同一台电脑关于多个SSH KEY管理
    dotnet core on Linux 环境搭建及入门demo
    Cannot load JDBC driver class 'com.mysql.jdbc.Driver '
    Mac OS 配置Maven
    Linux中profile、bashrc、bash_profile之间的区别和联系
    如何在Mac的Finder中显示/usr、/tmp、/var等隐藏目录
    Mac OS X 下查看和设置JAVA_HOME
    SSM框架整合(IntelliJ IDEA + maven + Spring + SpringMVC + MyBatis)
    事件
  • 原文地址:https://www.cnblogs.com/iiiiher/p/6442295.html
Copyright © 2020-2023  润新知