grid 默写第二遍
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>默写grid</title> </head> <style> .container { display: grid; border: 1px solid red; width: 100%; height: 100vh; grid-template-rows: 65px 50px auto 50px; grid-template-columns: 175px repeat(3, 3fr); grid-template-areas: 'aside header header header' 'aside nav nav nav' 'aside main main main' 'aside footer footer footer'; } .container header { grid-area: header; background-color: aqua; } .container nav { grid-area: nav; background-color: burlywood; } .container main { grid-area: main; background-color: cadetblue; } .container aside { grid-area: aside; background-color: chartreuse; } .container footer { grid-area: footer; background-color: darkgoldenrod; } </style> <body> <div class="container"> <header>header</header> <nav>nav</nav> <main>main</main> <aside>aside</aside> <footer>fotter</footer> </div> <script></script> </body> </html>