练习13_两列布局2.html 630 B

123456789101112131415161718192021222324252627282930
  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. body{
  9. margin: 0;
  10. }
  11. .box1{
  12. width: 300px;
  13. height: 600px;
  14. background-color: blue;
  15. }
  16. .box2{
  17. height: 600px;
  18. background-color: red;
  19. position: absolute;
  20. left: 300px;
  21. top: 0;
  22. right: 0;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <div class="box1"></div>
  28. <div class="box2"></div>
  29. </body>
  30. </html>