stacking-context-opacity-losing-css-animation-in-delay.html 648 B

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE html>
  2. <title>
  3. CSS opacity animation winning over web animation in delay phase creates
  4. a stacking context
  5. </title>
  6. <style>
  7. span {
  8. height: 100px;
  9. width: 100px;
  10. position: fixed;
  11. background: green;
  12. top: 50px;
  13. }
  14. @keyframes Opacity1 {
  15. from, to { opacity: 1; }
  16. }
  17. #test {
  18. width: 100px; height: 100px;
  19. background: blue;
  20. animation: Opacity1 100s;
  21. }
  22. </style>
  23. <span></span>
  24. <div id="test"></div>
  25. <script>
  26. document.getElementById("test")
  27. .animate({ opacity: [0.1, 0.1] }, { duration: 100000, delay: 100000 });
  28. requestAnimationFrame(function() {
  29. document.documentElement.classList.remove("reftest-wait");
  30. });
  31. </script>