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;
}

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章