grail.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <style>
  7. /*html,body{*/
  8. /*height: 100%;*/
  9. /*}*/
  10. .HolyGrail {
  11. display: flex;
  12. /*min-height: 100vh;*/
  13. flex-direction: column;
  14. height: 800px;
  15. }
  16. header,
  17. footer {
  18. background-color: #0a6aa1;
  19. flex: 1;
  20. /*height: 200px;*/
  21. }
  22. .HolyGrail-body {
  23. display: flex;
  24. flex: 5;
  25. /*height: 600px;*/
  26. background-color: #FFB5BF;
  27. align-items: flex-end;
  28. align-content: flex-start;
  29. }
  30. .HolyGrail-content {
  31. height: 500px;
  32. flex: 1;
  33. background-color: #0D3349;
  34. }
  35. .HolyGrail-nav, .HolyGrail-ads {
  36. /* 两个边栏的宽度设为12em */
  37. flex: 0 0 12em;
  38. background-color: red;
  39. height: 500px;
  40. }
  41. .HolyGrail-nav {
  42. /* 导航放到最左边 */
  43. order: -1;
  44. background-color: darkblue;
  45. }
  46. </style>
  47. </head>
  48. <body class="HolyGrail">
  49. <header></header>
  50. <div class="HolyGrail-body">
  51. <main class="HolyGrail-content">...</main>
  52. <nav class="HolyGrail-nav">...</nav>
  53. <aside class="HolyGrail-ads">...</aside>
  54. </div>
  55. <footer></footer>
  56. </body>
  57. </html>