transitions-inline-already-wrapped-2.html 728 B

1234567891011121314151617181920212223242526272829
  1. <html class="reftest-wait">
  2. <title>Test for CSS transitions and re-wrapping of inlines</title>
  3. <style type="text/css">
  4. #test { transition: 20ms color linear 0; }
  5. </style>
  6. <script type="text/javascript">
  7. window.onload = run;
  8. function run() {
  9. var test = document.getElementById("test");
  10. var unused = test.offsetWidth;
  11. unused = getComputedStyle(test, "").color;
  12. test.style.color = "green";
  13. unused = test.offsetWidth;
  14. unused = getComputedStyle(test, "").color;
  15. setTimeout(step2, 100); // give transition time to run
  16. }
  17. function step2() {
  18. document.documentElement.removeAttribute("class");
  19. }
  20. </script>
  21. <div style="width: 3em">
  22. <span id="test" style="color: red">
  23. This is some text with a transition.
  24. </span>
  25. </div>