码迷,mamicode.com
首页 > Web开发 > 详细

css练习 简单布局

时间:2014-07-19 15:05:37      阅读:268      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   java   color   width   

<!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练习 简单布局,布布扣,bubuko.com

css练习 简单布局

标签:style   blog   http   java   color   width   

原文地址:http://www.cnblogs.com/i124q29/p/3854151.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!