forked from craic/CSS3_webkit_demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
transform_rotate_demo.html
118 lines (102 loc) · 1.78 KB
/
transform_rotate_demo.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<title>CSS3 Webkit Examples</title>
<style>
body {
background: #ddd;
}
h2 {
font-weight: normal;
text-align: center;
font-family: courier;
}
#main {
position: relative;
margin-left: auto;
margin-right: auto;
width: 600px;
height: 400px;
background: white;
color: black;
font-size: 14px;
}
#box1 {
position: absolute;
border: 1px solid black;
background: #eef;
width: 100px;
height: 75px;
left: 250px;
top: 50px;
text-align: center;
}
#box2 {
position: absolute;
border: 1px solid black;
background: #eef;
width: 100px;
height: 75px;
left: 400px;
top: 50px;
text-align: center;
-webkit-transform: rotate(30deg);
}
#box3 {
position: absolute;
border: 1px solid black;
background: #eef;
width: 100px;
height: 75px;
left: 250px;
top: 250px;
text-align: center;
-webkit-transform: rotate(180deg);
}
#box4 {
position: absolute;
border: 1px solid black;
background: #eef;
width: 100px;
height: 75px;
left: 100px;
top: 50px;
text-align: center;
-webkit-transform: rotate(-30deg);
}
#box5 {
position: absolute;
border: 1px solid black;
background: #eef;
width: 100px;
height: 75px;
left: 400px;
top: 250px;
text-align: center;
-webkit-transform: rotate(120deg);
}
#box6 {
position: absolute;
border: 1px solid black;
background: #eef;
width: 100px;
height: 75px;
left: 100px;
top: 250px;
text-align: center;
-webkit-transform: rotate(-120deg);
}
</style>
</head>
<body>
<h2>-webkit-transform: rotate(<i>N</i>deg);</h2>
<div id='main'>
<div id='box1'>Default Box</div>
<div id='box2'>rotate(30deg)</div>
<div id='box3'>rotate(180deg)</div>
<div id='box4'>rotate(330deg)<br/>or<br/>rotate(-30deg)</div>
<div id='box5'>rotate(120deg)</div>
<div id='box6'>rotate(240deg)<br/>or<br/>rotate(-120deg)</div>
</div>
</body>
</html>