css练习 简单布局

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="style/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js.js"></script>
    <style type="text/css">

    </style>
    <script type="text/javascript">

    </script>
</head>
<body>
<div id="head">标题栏</div>
<div id="mainL">
    <ul>
        <li><a href="#">功能测试一</a></li>
        <li><a href="#">功能测试二</a></li>
        <li><a href="#">功能测试三</a></li>
        <li><a href="#">功能测试四</a></li>
    </ul>
</div>
<div id="mainC">中间内容</div>
<div id="mainR">右内容</div>
<div id="foot"><div id="footContent">版权所有,侵权必究<br/>All rights reserved. </div></div>
</body>
</html>

  

* {
    margin: 0;
    padding: 0;
}

#head {
    border: 1px solid black;
    height: 80px;
    font-size: 30px;
    font-weight: bold;
    font-family: "黑体", sans-serif;
    line-height: 80px;
    text-align: center;
}

#mainL {
    border: 1px solid #000000;
    width: 25%;
    height: 700px;
    float: left;
    margin-top: 10px;
    margin-bottom: 10px;
}

#mainC {
    border: 1px solid #000000;
    width: 50%;
    height: 700px;
    margin-left: 2.3%;
    float: left;
    margin-top: 10px;
    margin-bottom: 10px;
}

#mainR {
    border: 1px solid #000000;
    width: 20%;
    height: 700px;
    float: right;
    margin-top: 10px;
    margin-bottom: 10px;
}

#foot {
    border: 1px solid black;
    display: table;
    width: 100%;
    height: 60px;
    text-align: center;
}

#footContent {
    display: table-cell;
    vertical-align: middle;
    margin-top: 10 px\9; /*IE无table,table-cell,兼容IE*/
}

css练习 简单布局,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。