summaryrefslogtreecommitdiffstats
path: root/WebCore/manual-tests/animate-duration.html
blob: d8bf81ebba149ce316b554d14dd30b695fdb4116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Overriding Animations</title>
  <script src="../../shared/javascript/utils.js" type="text/javascript" charset="utf-8"></script>
  <style type="text/css" media="screen">

  .container {
     position: relative;
     width: 400px;
     height: 120px;
     border: 1px solid black;
     margin: 10px;
   }
   .box {
     position: relative;
     width: 100px;
     height: 100px;
     margin: 10px;
     background-color: blue;
     z-index: 0;
     -webkit-animation-name: "slide";
     -webkit-animation-duration: 1s;
     -webkit-animation-direction: alternate;
     -webkit-animation-timing-function: ease-in-out;
     -webkit-animation-iteration-count: infinite;
   }  

   .one {
     -webkit-animation-duration: 0s;
   }

   .two {
     -webkit-animation-duration: 0;
   }
   
   @-webkit-keyframes slide {
     from { -webkit-transform: translateX(0);      }
     to   { -webkit-transform: translateX(280px);  }
   }

  </style>
</head>
<body>
  <p>Single anim (should keep animating)</p>
  <div class="container" onclick="toggleClassName(this, 'highlighted')">
    <div class="box none">
    </div>
  </div>
  <p>duration: "0s" (should not animate)</p>
  <div class="container" onclick="toggleClassName(this, 'highlighted')">
    <div class="box one">
    </div>
  </div>
  <p>duration: "0" (should animate since inherits valid duration)</p>
  <div class="container" onclick="toggleClassName(this, 'highlighted')">
    <div class="box two">
    </div>
  </div>

</body>
</html>