Python devweb之css實例一

 Python devweb之css實例一

   three.css

.container {
    width: 800px;
    margin: 0 auto;
}
.header{
    height: 100px;
    background: gray;
}
.left{
    width: 200px;
    height: 300px;
    background: chartreuse;
    float: left;
}
.middle{
    height: 300px;
    background: purple;
}

.right{
    float: right;
    width: 200px;
    height: 300px;
    background: brown;
}

.footer{
    width: 800px;
    margin: 0 auto;
    text-align: center;
    background: gray;
}

  three.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="three.css">
</head>
<body>
<div  class="container">
    <div class="header"></div>
    <div class="content">
        <!--注意left--> right--> middle 順序-->
        <div class="left">left</div>
        <div class="right">right</div>
        <div class="middle">middle</div>
    </div>
    <div class="footer">
        <a href="http://linux.tedu.cn">Hello world!!</a>
    </div>
</div>
</body>
</html>

  執行three.html的結果

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