tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

in-visibility-hidden-animation.html (692B)


      1 <!DOCTYPE HTML>
      2 <html class="reftest-wait">
      3 <title>in visibility hidden color animation</title>
      4 <style>
      5 
      6 @keyframes color {
      7  0% { color: black }
      8  1% { color: blue }
      9  100% { color: blue }
     10 }
     11 
     12 p {
     13  visibility: visible;
     14 }
     15 
     16 div {
     17  color: black;
     18  animation: color 0.1s 1 forwards;
     19  visibility: hidden;
     20 }
     21 
     22 </style>
     23 <div id="parent"><p>color animation on visible element in invisible parent element</p></div>
     24 <script>
     25 
     26 document.getElementById("parent").addEventListener("animationend", AnimationEndListener);
     27 
     28 function AnimationEndListener(event) {
     29  setTimeout(RemoveReftestWait, 0);
     30 }
     31 
     32 function RemoveReftestWait() {
     33  document.documentElement.classList.remove("reftest-wait");
     34 }
     35 
     36 </script>