block-abs-pos-2-dyn.html 608 B

1234567891011121314151617181920212223242526272829303132
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <html>
  4. <head>
  5. <style type="text/css">
  6. #abs-pos {
  7. top: 20px; left: 20px;
  8. width: 200px;
  9. background-color: lightgreen;
  10. }
  11. #in-flow-child {
  12. height: 100px;
  13. margin-top: 40px;
  14. margin-bottom: 40px;
  15. background-color: green;
  16. }
  17. </style>
  18. <script type="text/javascript">
  19. function test() {
  20. document.getElementById('abs-pos').style.position = 'absolute';
  21. document.documentElement.removeAttribute('class');
  22. }
  23. document.addEventListener('MozReftestInvalidate', test, false);
  24. </script>
  25. </head>
  26. <body>
  27. <div id="abs-pos">
  28. <div id="in-flow-child"></div>
  29. </div>
  30. </body>
  31. </html>