Blogger Information
Blog 47
fans 0
comment 3
visits 44847
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Flex布局案例
江流
Original
423 people have browsed it
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>Flex布局-圣杯模式</title>
  8. </head>
  9. <body>
  10. <header>页眉</header>
  11. <div class="flex-container">
  12. <div class="item left">left</div>
  13. <div class="item main">main</div>
  14. <div class="item right">right</div>
  15. </div>
  16. <footer>页脚</footer>
  17. <style>
  18. * {
  19. padding: 0;
  20. margin: 0;
  21. box-sizing: border-box;
  22. }
  23. :root {
  24. font-size: 10px;
  25. }
  26. body {
  27. min-width: 48rem;
  28. }
  29. header,
  30. footer {
  31. background-color: lightgray;
  32. height: 10em;
  33. }
  34. .flex-container {
  35. display: flex;
  36. min-height: 60em;
  37. }
  38. .left,
  39. .right {
  40. background-color: lightseagreen;
  41. flex: 0 0 16em;
  42. }
  43. .main {
  44. flex: 1;
  45. }
  46. </style>
  47. </body>
  48. </html>

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post