首页 > 编程语言 > 详细

day16 web前端之JavaScript

时间:2017-02-20 21:23:34      阅读:201      评论:0      收藏:0      [点我收藏+]

页面布局补充

样例页面:

技术分享

示例代码:

<!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{
            height: 48px;
            background-color: #2459a2;
        }
        .pg-body .pg-menu{
            width:10%;
            height: 1000px;;
            background-color: antiquewhite;
            position: absolute;
            top: 48px;;
            left:0;
            /*bottom:0;*/
        }
        .pg-body .pg-content{
            width:90%;
            position: absolute;
            top: 48px;
            right:0;
            bottom:0;
            overflow: auto;
            background-color: #3300cc;
            z-index: 9;
        }
        .pg-header .logo {
            color: black;
            text-align: center;
            width:10%;;
            line-height: 48px;
            background-color: wheat;
        }
        .pg-header .userinfo img{
            border-radius: 50%;
        }
        .pg-header .userinfo{
            border:1px solid red;
            margin-top: 4px;
            width: 140px;
        }
         .pg-header .userinfo .infolist {
             display: none;
         }
        .pg-header .userinfo:hover .infolist{
            display: block;
            color: red;
        }
        .pg-header .userinfo .infolist{
            position: absolute;
            background-color: #009933;
            top: 43px;
            right: 36px;
        }
        .pg-header .userinfo .infolist a{
            position: relative;
            display: block;
            color: white;
            width: 140px;
            text-align: center;
        }

    </style>
</head>
<body>
    <div class="pg-header">

        <div class="logo left">
            <span>welcome</span>
        </div>

        <div class="userinfo right" style="position: relative;">
            <a href=""><img src="1.png" alt="" width="42" height="40" ></a>
            <div class="infolist"  style="position: absolute;top: 43px;right:20px;z-index:10">
                <a>我的信息</a>
                <a>登陆</a>
            </div>
        </div>
    </div>
    <div class="pg-body">
        <div class="pg-menu">
         这是侧边栏
        </div>
        <div class="pg-content">
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
            <p>这是内容</p>  <p>这是内容</p>   <p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p><p>这是内容</p>
        </div>
    </div>
</body>
</html>

day16 web前端之JavaScript

原文:http://www.cnblogs.com/wanghui1991/p/6421066.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!