html
1<!DOCTYPE HTML>
2<html lang="ja">
3 <head>
4 <meta charset="UTF-8">
5 <title></title>
6 <style type="text/css">
7 html,body {
8 margin: 0;
9 padding: 0;
10 width: 100%;
11 height: 100%;
12 }
13 body {
14 display: flex;
15 flex-direction: column;
16 }
17 .flex-item {
18 flex-grow: 1;
19 }
20 header.flex-item,
21 footer.flex-item {
22 max-height: 10%;
23 background-color: rgba(0,0,0,0.9);
24 color: white;
25 }
26 header.flex-item {
27 box-shadow: 0 5px 5px rgba(0,0,0,0.5);
28 }
29 </style>
30 </head>
31 <body>
32 <header class="flex-item">
33 Header
34 </header>
35 <main class="flex-item">
36 Main
37 </main>
38 <footer class="flex-item">
39 Footer
40 </footer>
41 </body>
42</html>