block-horizontal-2-dyn.html 693 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <head>
  4. <style type="text/css">
  5. #float-blue {
  6. float: right;
  7. margin-left: 20px;
  8. background-color: blue;
  9. width: 40px;
  10. height: 100px;
  11. }
  12. .dyn {
  13. display: none;
  14. }
  15. .float-green {
  16. float: right;
  17. margin: 0 20px;
  18. background-color: green;
  19. width: 40px;
  20. height: 100px;
  21. }
  22. </style>
  23. <script type="text/javascript">
  24. function test() {
  25. document.getElementsByClassName('dyn')[0].style.display = 'block';
  26. document.documentElement.removeAttribute('class');
  27. }
  28. document.addEventListener('MozReftestInvalidate', test, false);
  29. </script>
  30. </head>
  31. <body>
  32. <div id="float-blue"></div>
  33. <div class="float-green dyn"></div>
  34. <div class="float-green"></div>
  35. </body>
  36. </html>