block-sibling-2-ref2.html 391 B

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style type="text/css">
  5. #red {
  6. height: 20px;
  7. background-color: red;
  8. }
  9. #green {
  10. height: 20px;
  11. background-color: green;
  12. }
  13. #blue {
  14. height: 20px;
  15. background-color: blue;
  16. }
  17. .margin {
  18. height: 20px;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div id="red"></div>
  24. <div class="margin"></div>
  25. <div id="green"></div>
  26. <div class="margin"></div>
  27. <div id="blue"></div>
  28. </body>
  29. </html>