Web前端笔记(8) 管后台理页面

管理后台整页制:

设计一个管理后台,图标资源使用的是iconfont中的图标:


页面采用的是典型的后台管理页面布局:

页面的代码:
html文件:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../picture/manager_icon/iconfont.css">
    <link rel="stylesheet" href="../CSS/manager_common.css">
    <script src="../picture/manager_icon/iconfont.js"></script>
    <style>
        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <header id="header" class="clear">
        <hgroup class="header-logo l">
            <h1 class="l">
                <img src="../picture/bowen/3.png" alt="" style="width: 40px;height: 40px">
            </h1>
            <h2 class="l">正大建筑内部管理平台</h2>
        </hgroup>
        <ul class="header-navi r">
            <li>
                <div class="iconfont iconwode"></div><a href="#">管理员</a>
            </li>
            <li>
                <div class="iconfont iconkey"></div><a href="#">修改密码</a>
            </li>
            <li>
                <div class="iconfont iconshouye"></div><a href="#">公司官网</a>
            </li>
            <li>
                <div class="iconfont iconfenxiang"></div><a href="#">退出</a>
            </li>
        </ul>
    </header>
    <div id="aside" class="l">
        <ul>
            <li>
                <a href="#">
                    <div class="iconfont iconloukongguanli"></div>
                    <p>项目管理</p>
                </a>
            </li>
            <li>
                <a href="#">
                    <div class="iconfont iconkehu"></div>
                    <p>用户管理</p>
                </a>
            </li>
            <li>
                <a href="#">
                    <div class="iconfont iconshezhi"></div>
                    <p>系统管理</p>
                </a>
            </li>
        </ul>
    </div>
    <div id="main">
        <div class="main-content">
            <div id="project-title" class="clear">
                <div class="project-title-left l">
                    <div class="title clear">
                        <h2 class="l">青海省一期工程</h2>
                        <div class="iconfont iconbianji l"></div>
                    </div>
                    <div class="title-list">
                        <p>项目编号: <span>CN26515</span></p>
                    </div>
                    <div class="title-list">
                        <p>项目类型: <span>在建工程</span></p>
                    </div>
                    <div class="title-list">
                        <p>项目负责人: <span>李磊</span></p>
                    </div>
                    <div class="title-list">
                        <p>手机号码: <span>14587552145</span></p>
                    </div>
                </div>
                <div class="project-title-right r">
                    <img src="../picture/others/timg1.jpg" alt="" style="width: 200px; height: 149px">
                </div>
            </div>
            <div id="project-content">
                <div class="project-content-btns">
                    <ul>
                        <li>视频监控</li>
                        <li>考勤管理</li>
                        <li>安全巡查</li>
                        <li>资料管理</li>
                    </ul>
                </div>
                <div class="project-content-functionBlock clear">
                    <div class="upload-1 l">
                        <label>
                            <input type="file">
                            <i class="iconfont iconshangchuan">&nbsp;&nbsp;</i>单个上传
                        </label>
                    </div>
                    <div class="upload-2 l">
                        <label>
                            <input type="file">
                            <i class="iconfont iconhuaban">&nbsp;&nbsp;</i>批量上传
                        </label>
                    </div>
                    <div class="search r">
                        <label>
                            <input type="search" placeholder="请输入关键字">
                            <button><i class="iconfont iconsousuo"></i></button>
                        </label>
                    </div>
                </div>
                <div class="project-content-cons">
                    <table class="data-table">
                        <thead>
                            <tr>
                                <th style="width: 49px"><input type="checkbox"></th>
                                <th>文档名称</th>
                                <th style="width: 167px">文档大小</th>
                                <th style="width: 148px">上传者</th>
                                <th style="width: 168px">上传时间</th>
                                <th style="width: 81px">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                            <tr>
                                <td><input type="checkbox"></td>
                                <td><i class="iconfont iconword"></i>安全专项方案.doc</td>
                                <td>32.1kb</td>
                                <td>张三</td>
                                <td>2018-12-1</td>
                                <td><i class="iconfont iconxiazai"></i>&nbsp;&nbsp;<i class="iconfont iconchushaixuanxiang"></i></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="content-footer">
                    <button class="delete-btn l">批量删除</button>
                    <button class="download-btn l">批量下载</button>
                    <div class="page r">
                        <a href="#">共12条</a>
                        <a href="#">首页</a>
                        <a href="#">上一页</a>
                        <a href="#">1</a>
                        <a href="#">2</a>
                        <a href="#">3</a>
                        <a href="#">下一页</a>
                        <a href="#">尾页</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="footer">
        <span>Copyright @ 2009-2016 北京市正大建筑工程有限公司 All rights reserved.</span>
    </div>
</body>
</html>

CSS样式:

*{
    padding: 0;
    margin: 0;
}
ul{
    list-style: none;
}

img{
    display: block;
}

a{
    text-decoration: none;
    color: darkgray;
}

h1,h2,h3,h4,h5,h6{
    font-size: 16px;
    font-weight: normal;
}

body{
    font-family: "微软雅黑";
    height: 100%;
    overflow-y: hidden;      /*禁止出现滚动条*/
}

.l{
    float: left;
}

.r{
    float: right;
}

.clear:after{
    content: "";
    display: block;
    clear: both;
}


#header{
    height: 80px;
    background: #018ffb;
    border-top: 5px #424147 solid;
}

#header .header-logo{

}

#header .header-logo h1{
    margin: 19px 14px 0 25px;
}

#header .header-logo h1 img{

}

#header .header-logo h2{
    line-height: 25px;
    color: white;
    font-size: 24px;
    margin-top: 25px;
}

#header .header-navi{
    font-size: 14px;
    color: white;
    line-height: 14px;
    margin-top: 33px;
}

#header .header-navi li{
    float: left;
    margin-right: 25px;
}

#header .header-navi li div{
    float: left;
    margin-right: 8px;
}

#header .header-navi li div.iconshouye{
    font-size: 20px;
}

#header .header-navi li div.iconfenxiang{
    font-size: 20px;
}


#header .header-navi li a{
    color: white;
    float: left;
}

#aside{
    width: 190px;
    height: 800px;
    background: #424147;
}

#aside ul{
    width: 100%;
    color: #9a999e;
    text-align: center;
}

#aside li{
    height: 140px;
    border-bottom: 1px solid #3a393e;
    border-top: 1px solid #49484e;
}

#aside li:hover{
    /*color: white;*/
    /*background: #4e4d53;*/
}

#aside li a:hover{
    color: white;
    background: #4e4d53;
}

#aside li div{
    font-size: 34px;
    margin-top: 35px;
}

#aside li p{
    margin-top: 25px;
}

#aside div.iconshezhi{
    font-size: 40px;
}

#main{
    /*出发BFC*/
    overflow: hidden;
    height: 584px;
}

#main .main-content{
    height: 100%;
    overflow: auto;
}

/*#main .main-content{*/
/*    margin: 21px 0 0 22px;*/
/*}*/

#main #project-title{
    margin: 21px 0 0 22px;
}
#main #project-title .title{
    margin-bottom: 10px;
}

#main #project-title .title h2{
    font-size: 24px;
    margin-right: 31px;
    line-height: 25px;
}

#main #project-title .title div{
    font-size: 24px;
    line-height: 25px;
}

#main #project-title .title-list p{
    font-size: 14px;
    line-height: 30px;
}


#main #project-title .title-list span{
    color: #999999;
    font-size: 14px;
}

#main #project-title .project-title-right{
    margin: 0 20px 0 0;
}

#main #project-title{
    margin-bottom: 14px;
}

#project-content .project-content-btns{
    height: 54px;
    background-color: #f1f9fc;
    border-top: 1px solid #e0eaef;
    border-bottom: 1px solid #dbe7ed;
}

#project-content .project-content-btns ul{
    margin: 16px 0 0 15px;
    font-size: 16px;
}

#project-content .project-content-btns li{
    float: left;
    width: 108px;
    height: 39px;
    border: 1px solid #dbe7ed;
    border-bottom: none;
    background: #fbfeff;
    color: #666666;
    text-align: center;
    line-height: 39px;
    margin-right: 12px;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
}

#project-content .project-content-btns li:hover {
    background-color: #018ffb;
    color: white;
}

#project-content .project-content-functionBlock{
    margin: 20px;
}

#project-content .project-content-functionBlock label{
   cursor: pointer;
}

#project-content .project-content-functionBlock .upload-1{
    width: 110px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 14px;
    color: white;
    background: #5fd15c;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 20px;
}

#project-content .project-content-functionBlock .upload-2{
    width: 110px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 14px;
    color: white;
    background: #34c1da;
    border-radius: 5px;
    cursor: pointer;
}

#project-content .project-content-functionBlock .search{
    width: 210px;
    height: 30px;
    border: 1px solid #dbe7ed;
    border-radius: 5px;
}

#project-content .project-content-functionBlock .search input{
    width: 175px;
    border: none;
    height: 99%;
    font-size: 14px;
    color: #999999;
    text-indent: 9px;
    position: relative;
    top: -1px;
    outline: none;
}

#project-content .project-content-functionBlock .search button{
    width: 30px;
    height: 30px;
    border: none;
}

#project-content .project-content-functionBlock .search i
{
    font-size: 18px;
}
#project-content .project-content-functionBlock .upload-1 i.iconfont
{
    font-size: 14px;
    line-height: 32px;
}
#project-content .project-content-functionBlock .upload-2 i.iconfont
{
    line-height: 32px;
    font-size: 18px;
}

#project-content .project-content-functionBlock .upload-1 input{
    display: none;
}

#project-content .project-content-functionBlock .upload-2 input{
    display: none;
}

#project-content .project-content-cons{
    width: 98%;
    height: 100%;
    margin: 0 auto;
    /*margin-left: 10px;*/
    /*margin-right: 10px;*/
}

#project-content .project-content-cons table{
    width: 100%;
    border: 1px solid #dbe7ed;
    font-size: 12px;
    border-collapse: collapse;   /*边框合并,才能够显示*/
}

#project-content .project-content-cons tr{
    height: 32px;
    border-bottom: 1px solid #e7eff3;
}

#project-content .project-content-cons tr:hover{
    background: #f1f9fc;
}
#project-content .project-content-cons th{
    border-right: 1px solid #e7eff3;
    color: #666666;
    line-height: 32px;
    text-align: left;
    text-indent: 12px;
    background: #f1f9fc;
}

#project-content .project-content-cons td{
    text-align: left;
    text-indent: 12px;
}
#project-content .project-content-cons th:first-child{
    text-indent: 0;
    text-align: center;
}

#project-content .project-content-cons th:first-child input{
    position: relative;
    top: 2px;
}

#project-content .project-content-cons td:first-child{
    text-indent: 0;
    text-align: center;
}

#project-content .project-content-cons td:first-child input{
    position: relative;
    top: 2px;
}

#project-content .project-content-cons td i.iconfont{
    margin-right: 12px;
    color: #0173ca;
}

#project-content .project-content-cons tr i.iconxiazai{
    color: #3da2f0;
}

#project-content .project-content-cons tr i.iconchushaixuanxiang{
    color: #d94141;
}

#project-content .content-footer{
    height: 28px;
    margin: 5px 12px 0 12px;
    /*border: 1px solid #dbe7ed;*/
}

#project-content .content-footer button{
    width: 80px;
    height: 24px;
    border-radius: 5px;
    position: relative;
    top: 2px;
    margin-right: 15px;
    font-size: 13px;
    outline: none;
    background-image: linear-gradient(#f7fcff, #e7e4fa);
    cursor: pointer;
}

#project-content .content-footer div.page{
    font-size: 13px;
}

#project-content .content-footer div.page a{
    height: 24px;
    line-height: 24px;
    padding: 0 8px;
    border: 1px solid #e6e6e6;
    position: relative;
    top: 4px;
    text-align: center;
    margin-left: 8px;
}

#project-content .content-footer div.page a:hover{
    background: #42adff;
    color: white;
    border: 1px #3797e0 solid;
}

#footer{
    overflow: hidden;
    height: 49px;
    border: 1px solid gray;
    line-height: 49px;
    font-size: 12px;
    text-align: right;
    color: #888888;
    background-color: #f1f9fc;
}

#footer span{
    margin-right: 20px;
}

 

 

posted @ 2020-03-22 15:06  Alpha205  阅读(84)  评论(0编辑  收藏  举报