zoukankan      html  css  js  c++  java
  • css grid 布局


    <!DOCTYPE html>

    <html>
    <head>
    <meta name="viewport" content="width=device-width" />
    <title>TEST</title>
    <style>
    .header {
    grid-area: h;
    background-color:red;
    }

    .menu {
    grid-area: m;
    background-color: blue;
    }

    .content {
    grid-area: c;
    background-color: red;
    }

    .footer {
    grid-area: f;
    background-color: green;
    }
    .wrapper {
    display: grid;
    grid-template-columns: 200px 200px 200px;
    grid-template-rows: 50px 50px;



    }

    .container {
    display: grid;
    grid-gap: 5px;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 50px 800px 50px;
    grid-template-areas: "h h h h h h h h h h h h" "m m c c c c c c c c c c" "f f f f f f f f f f f f";
    }
    </style>
    </head>
    <body>
    @*<div class="wrapper">
    <div style=" background-color: red;">1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    </div>*@

    <div class="container">

    <div class="header">HEADER</div>

    <div class="menu">MENU</div>

    <div class="content">CONTENT</div>

    <div class="footer">FOOTER</div>

    </div>
    </body>
    </html>

  • 相关阅读:
    java数的相加
    读大道至简第二章有感
    读大道至简第一章有感
    课题的跨专业组队
    返回一个整数数组中最大子数组的和。
    《构建之法》阅读笔记02
    单元测试(2)
    软件工程个人作业03
    单元测试
    团队
  • 原文地址:https://www.cnblogs.com/superstar/p/13529016.html
Copyright © 2011-2022 走看看