-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre_transform.html
51 lines (41 loc) · 1.32 KB
/
pre_transform.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.square{
width:220px;
height:220px;
background-color:blue;
position:absolute;
top:50%;
left:35%;
border-radius:5px;
transform:rotate(3600deg) translate(-500,-500);
-webkit-transform:rotate(3600deg) translate(-500,-500);
transition:all 1s;
-webkit-transition:all 3s;
-moz-transition:all 1s;
-o-transition:all 1s;
}
</style>
</head>
<body>
<script type="text/javascript">
document.write('<div class="square" > Hi </div>');
var i = 10;
//document.getElementsByClassName('square').item(0).style.webkitTransform = 'translate(-100'+'px'+',200'+'px'+')';
function rotate(){
//alert('hi');
i += 500;
document.getElementsByClassName('square').item(0).style.webkitTransform -= 'rotate(100deg)';
//document.getElementsByClassName('square').item(0).style.borderRadius += i + 'px';
//alert('0');
document.getElementsByClassName('square').item(0).style.webkitTransform -= 'translate(20'+'px'+',50'+'px'+')';
}
//rotate();
//setInterval(rotate,300);
</script>
</body>
</html>