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的结果

Python devweb之css实例一

相关文章:

  • 2022-02-02
  • 2021-08-20
  • 2021-11-30
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
猜你喜欢
  • 2021-10-19
  • 2021-06-26
  • 2021-09-01
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案