OLD | NEW |
| (Empty) |
1 <!-- | |
2 Copyright 2012 Google Inc. All Rights Reserved. | |
3 | |
4 Licensed under the Apache License, Version 2.0 (the "License"); | |
5 you may not use this file except in compliance with the License. | |
6 You may obtain a copy of the License at | |
7 | |
8 http://www.apache.org/licenses/LICENSE-2.0 | |
9 | |
10 Unless required by applicable law or agreed to in writing, software | |
11 distributed under the License is distributed on an "AS IS" BASIS, | |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 See the License for the specific language governing permissions and | |
14 limitations under the License. | |
15 --> | |
16 | |
17 <!DOCTYPE html><meta charset="UTF-8"> | |
18 <style> | |
19 .anim { | |
20 width: 800px; | |
21 height: 70px; | |
22 -webkit-transform: translate(-800px, 0px); | |
23 transform: translate(-800px, 0px); | |
24 background-color: lightsteelblue; | |
25 } | |
26 </style> | |
27 <div class="anim" id="overflow"></div> | |
28 <div class="anim" id="overflowControl"></div> | |
29 <div class="anim" id="underflow"></div> | |
30 <div class="anim" id="underflowControl"></div> | |
31 <script src="../bootstrap.js"></script> | |
32 <script> | |
33 "use strict"; | |
34 | |
35 var effect = [{transform: "translate(-800px,0px)"}, {transform: "translate(0px,0
px)"}]; | |
36 | |
37 var group = new AnimationGroup(); | |
38 document.timeline.play(new AnimationGroup([ | |
39 new Animation(overflow, | |
40 effect, | |
41 { duration: 0.3 * 1000, delay: 0.25 * 1000, fill: 'forwards' }
)])); | |
42 | |
43 document.timeline.play(new AnimationGroup([ | |
44 new Animation(overflowControl, | |
45 effect, | |
46 { duration: 0.3 * 1000, delay: 0.2 * 1000, fill: 'forwards' })
])); | |
47 | |
48 document.timeline.play(new AnimationGroup([ | |
49 new Animation(underflow, | |
50 effect, | |
51 { duration: 0.3 * 1000, delay: 0.20001 * 1000, fill: 'none' })
])); | |
52 | |
53 document.timeline.play(new AnimationGroup([ | |
54 new Animation(underflowControl, | |
55 effect, | |
56 { duration: 0.3 * 1000, delay: 0.2 * 1000, fill: 'none' })])); | |
57 | |
58 </script> | |
59 | |
60 | |
OLD | NEW |