inline-block-sibling-1b-dyn.html 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <head>
  4. <style type="text/css">
  5. #parent {
  6. width: 200px;
  7. background-color: lightgreen;
  8. }
  9. #inline-block1, #inline-block2 {
  10. height: 2em; width: 200px;
  11. background-color: green;
  12. vertical-align: bottom;
  13. }
  14. #inline-block1 {
  15. margin-bottom: 1.5em;
  16. }
  17. #inline-block2 {
  18. margin-top: .5em;
  19. }
  20. </style>
  21. <script type="text/javascript">
  22. function test() {
  23. document.getElementById('inline-block1').style.display = 'inline-block';
  24. document.getElementById('inline-block2').style.display = 'inline-block';
  25. document.documentElement.removeAttribute('class');
  26. }
  27. document.addEventListener('MozReftestInvalidate', test, false);
  28. </script>
  29. </head>
  30. <body>
  31. <div id="parent">
  32. <div id="inline-block1"></div>
  33. <div id="inline-block2"></div>
  34. </div>
  35. </body>
  36. </html>