tor-browser

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

animation-duration-003-manual.html (1446B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Animations Test: animation-duration - negative value</title>
      4 <link rel="author" title="Nokia Inc." href="http://www.nokia.com">
      5 <link rel="author" title="Intel" href="http://www.intel.com">
      6 <link rel="reviewer" title="Zhiqiang Zhang" href="mailto:zhiqiang.zhang@intel.com"> <!-- 2015-05-05 -->
      7 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-name">
      8 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-duration">
      9 <meta name="flags" content="animated">
     10 <meta name="assert" content="When animation-duration is set to a negative value,
     11                             it is treated as 0s (zero seconds) and no animation is seen.">
     12 <style>
     13  div {
     14    animation-name: sample;
     15 
     16    background-color: blue;
     17    height: 100px;
     18    width: 100px;
     19    position: relative;
     20  }
     21 
     22  @keyframes sample {
     23    from {
     24      left: 150px;
     25    }
     26    to {
     27      left: 0px;
     28    }
     29  }
     30 </style>
     31 <body>
     32  <p>
     33    Test passes if there is a filled blue square with 'Filler Text',
     34    which starts staying left for about 2 seconds upon page load,
     35    then moves from right to left.
     36  </p>
     37  <div>Filler Text</div>
     38  <script>
     39    var div = document.getElementsByTagName("div");
     40    div[0].style.animationDuration = "-2s";
     41    setTimeout(setAnimationDuration, 2000);
     42 
     43    function setAnimationDuration() {
     44      div[0].style.animationDuration = "10s";
     45    }
     46  </script>
     47 </body>