12.左侧定宽右侧上中下.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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>Document</title>
  7. <style>
  8. #box {
  9. width: 1200px;
  10. height: 888px;
  11. border:3px solid #000;
  12. display: flex;
  13. }
  14. #box .left {
  15. width: 200px;
  16. height: 100%;
  17. background: #f00;
  18. }
  19. #box .right {
  20. flex: 1;
  21. height: 100%;
  22. background: #ff0;
  23. margin-left: 30px;
  24. display: flex;
  25. flex-direction: column;
  26. }
  27. .right .header {
  28. width: 100%;
  29. height: 120px;
  30. background: #0f0;
  31. }
  32. .right .mid {
  33. width: 100%;
  34. flex: 1;
  35. background: palevioletred;
  36. }
  37. .right .bottom {
  38. width: 100%;
  39. height: 180px;
  40. background: rgb(22, 150, 186);
  41. }
  42. </style>
  43. </head>
  44. <body>
  45. <div id="box">
  46. <div class="left">
  47. </div>
  48. <div class="right">
  49. <div class="header">
  50. </div>
  51. <div class="mid">
  52. </div>
  53. <div class="bottom">
  54. </div>
  55. </div>
  56. </div>
  57. </body>
  58. </html>