Blogger Information
Blog 4
fans 0
comment 0
visits 3155
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
flex实现pc端三列布局
麻明山
Original
792 people have browsed it
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title> flex实现pc端三列布局</title>
  7. <style>
  8. body {
  9. width: 1200px;
  10. display: flex;
  11. flex-flow: column nowrap;
  12. margin: auto;
  13. }
  14. .container {
  15. display: flex;
  16. min-height: 600px;
  17. justify-content: space-between;
  18. }
  19. .container > aside {
  20. flex: 0 0 300px; background-color: firebrick;
  21. }
  22. .container > main {
  23. flex: 0 0 600px;
  24. }
  25. .container > main {
  26. flex: auto; background: forestgreen;
  27. }
  28. </style>
  29. </head>
  30. <body>
  31. <div class="container">
  32. <aside>左边</aside>
  33. <main>主体区</main>
  34. <aside>右边</aside>
  35. </div>
  36. </body>
  37. </html>

运行效果

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