• 页面布局


    需要制作出如下图片的效果 :

    
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    body{
    margin: 0 auto;
    }
    .left{
    float: left;
    }
    .right{
    float: right;
    }
    .pg-header{
    height: 48px;
    background-color: #2459a2;
    color:white;
    line-height: 48px;
    }
    .pg-header .logo{
    200px;
    background-color:green;
    text-align: center;
    }
    .pg-header .user{
    160px;
    background-color: palegreen;
    height: 48px;
    }
    .pg-header .user .b{
    top: 48px;
    right: 95px;
    background-color: green;
    z-index: 20;
    160px;
    display: none;
    }
    .pg-header .user:hover .b{
    display: block;
    }
    .pg-header .user:hover{
    background-color: red;
    }
    .pg-header .user .b a{
    display: block;
    }
    .pg-content .menu{
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    background-color: #dddddd;
    200px;

    }
    .pg-content .content{
    position: fixed;
    top: 48px;
    right: 0;
    bottom: 0;
    left: 200px;
    background-color:blue;
    overflow: auto;
    z-index: 10;

    }
    </style>
    </head>
    <body>
    <div class="pg-header">
    <div class="logo left">LOGO</div>
    <div class="user right" style="position: relative">
    <a>
    <img style=" 40px;height: 40px;margin-top: 4px;border-radius: 50%;" src="4.jpg">
    </a>
    <div class="b" style="position: absolute">
    <a>我的资料</a>
    <a>退出</a>
    </div>
    </div>
    </div>
    <div class="pg-content">
    <div class="menu"></div>
    <div class="content">
    <div style="height: 5000px">fdsa</div>
    </div>
    </div>
    </body>
    </html>
     
  • 相关阅读:
    android 设置状态栏与标题背景颜色一致
    Android 无标题、全屏设置
    android Activity绑定Service
    lua入门之四元表
    lua入门之三module
    lua入门之二table
    lua入门之一函数
    Cocos2dx 3.10版编译安卓报卷标错误
    js 创建、添加、删除元素节点 添加文本节点
    正则表达式
  • 原文地址:https://www.cnblogs.com/wulafuer/p/11113161.html
Copyright © 2020-2023  润新知