-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtest-composite-transforms.html
68 lines (53 loc) · 1.86 KB
/
test-composite-transforms.html
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
66
67
68
<!--
Copyright 2012 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<style>
.anim {
left: 0px;
width: 100px;
height: 100px;
background-color: #FAA;
position: absolute;
}
.expected {
width: 100px;
height: 100px;
position: absolute;
border-right: 1px solid black;
}
#a {
top: 50px
}
#b {
top: 150px;
}
#c {
top: 250px;
}
#d {
top: 350px;
}
</style>
<div>Right edge of each box should align with black line at end of test.</div>
<div id="a" class="anim"></div> <div id="a" style="top: 50px; left: 200px;" class="expected"></div>
<div id="b" class="anim"></div> <div id="b" style="top: 150px; left: 0px;" class="expected"></div>
<div id="c" class="anim"></div> <div id="c" style="top: 250px; left: 200px;" class="expected"></div>
<div id="d" class="anim"></div> <div id="d" style="top: 550px; left: 0px;" class="expected"></div>
<script src="web-animation.js"></script>
<script>
var divs = document.querySelectorAll(".anim");
new Anim(divs[0], {"-webkit-transform": ["translate(0px, 0px)", "translate(200px, 0px)"]}, 2);
new Anim(divs[1], {"-webkit-transform": ["rotate(0deg)", "rotate(90deg)"]}, 2);
new Anim(divs[2], {"-webkit-transform": ["translate(0px, 0px) rotate(0deg)", "translate(200px, 0px) rotate(90deg)"]}, 2);
new Anim(divs[3], {"-webkit-transform": ["rotate(0deg) translate(0px, 0px)", "rotate(90deg) translate(200px, 0px)"]}, 2);
</script>