Neue Datei |
| | |
| | | <!DOCTYPE html>
|
| | | <html lang="en">
|
| | | <head>
|
| | | <meta charset="UTF-8">
|
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| | | <title>Responsive Layout</title>
|
| | | <style>
|
| | | html, body {
|
| | | margin: 0;
|
| | | padding: 0;
|
| | | |
| | | width: 100%;
|
| | | height: 100%;
|
| | | }
|
| | | |
| | | .grid {
|
| | | width: 100%;
|
| | | height: 100%;
|
| | | |
| | | display: grid;
|
| | | |
| | | grid-template-areas:
|
| | | "menu header"
|
| | | "menu content"
|
| | | "menu footer";
|
| | |
|
| | | grid-template-columns: 2fr 5fr;
|
| | | grid-template-rows: 2fr 5fr 2fr;
|
| | | }
|
| | | |
| | | .menu {
|
| | | grid-area: menu;
|
| | | |
| | | background-color: lightcoral;
|
| | | }
|
| | |
|
| | | .header {
|
| | | grid-area: header;
|
| | |
|
| | | background-color: lightblue;
|
| | | }
|
| | |
|
| | | .content {
|
| | | grid-area: content;
|
| | |
|
| | | background-color: lightgreen;
|
| | | }
|
| | |
|
| | | .footer {
|
| | | grid-area: footer;
|
| | |
|
| | | background-color: lightsalmon;
|
| | | }
|
| | |
|
| | | /* @media and () {
|
| | | }
|
| | | */
|
| | | </style>
|
| | | </head>
|
| | | <body>
|
| | | <div class="grid">
|
| | | <div class="menu">Menu</div>
|
| | | <div class="header">Header</div>
|
| | | <div class="content">Content</div>
|
| | | <div class="footer">Footer</div>
|
| | | </div>
|
| | | </body>
|
| | | </html>
|