码迷,mamicode.com
首页 > 其他好文 > 详细

后台管理页面的布局

时间:2021-01-05 11:23:38      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:dde   add   返回   char   fixed   meta   pad   --   icon   

技术图片
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台管理布局</title>
    <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">
    <style>
        body{
            margin: 0;
        }
        .pg-header{
            height: 48px;
            background-color: #2459a2;
            color: white;
            line-height: 48px;
            /*高度居中*/
        }
        .pg-header .icons{
            padding: 0 20px;

        }
        .pg-header .icons:hover{
            background-color: #204982;

        }
        .pg-header .logo{
            width: 200px;
            background-color: cadetblue;
            text-align: center;
            /*font-size: 40px;*/
        }
        .pg-header .user{
            width: 50px;
            background-color: purple;
            text-align: center;
            line-height: 48px;
            /*font-size: 40px;*/
            height: 48px;
            margin-top: 4px;
            margin-right: 60px;
        }
        .pg-header .user:hover{
            background-color: #FF7F24;
            /*鼠标放上去能有不同颜色*/
        }
        .pg-header .user .a img{
            height: 40px;
            width: 40px;
            border-radius: 50%
        }
        .pg-header .user .b{
            z-index:20;
            position:absolute;
            top: 30px;
            right: 0;
            color: red;
            width: 90px;
            display: none;

        }
        .pg-header .user:hover .b{
            display: block;


        }
        .pg-header .user .b a{
            display: block;
        }
        .pg-content .menu{
            position: absolute;
            top: 48px;
            bottom: 0;
            left: 0;
            right: 0;
            width: 200px;
            background-color: #dddddd;


        }
        .pg-content .content{
            position: absolute;
            top: 48px;
            right: 0;
            bottom: 0;
            left: 200px;
            background-color: lightgray;
            overflow: auto;
            min-width: 900px;
            z-index: 9;


        }
        .left{
            float: left;
        }
        .right{
            float: right;
        }
    </style>
</head>
<body>
    <div class="pg-header">
        <div class="logo left">
            老男人
        </div>

        <div class="user right" style="position: relative">
            <a class="a" href="">
                <img  src="1.jpg">
                <!--border-radius把图片变成圆的-->
            </a>
            <div class="b">
                <a href="">我的资料</a>
                <a href="">注销</a>
            </div>
        </div>
        <div class="right icons">
            <i class="fa fa-bell" aria-hidden="true"></i>
        </div>
        <div class="right icons">
            <i class="fa fa-envelope" aria-hidden="true"></i>
        </div>
    </div>
    <div class="pg-content">
        <div class="menu left">a</div>
        <div class="content right">
            <p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p><p>adsad</p>
            <div style="width: 50px;height: 50px;bottom: 0;right: 0;position: fixed">返回顶部</div>
        </div>
    </div>
    <div class="pg-footer"></div>

</body>
</html>
View Code

 

 

 

 

line-height: 48px;

/*高度居中*/

:hover

悬浮显示

后台管理页面的布局

标签:dde   add   返回   char   fixed   meta   pad   --   icon   

原文地址:https://www.cnblogs.com/anhao-world/p/14221273.html

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