-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransition.html
63 lines (63 loc) · 1.4 KB
/
transition.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type='text/css'>
#color_changer {
width: 200px;
height: 200px;
background-color: green;
-webkit-transition: background-color 2s; /* Safari */
transition: background-color 2s;
}
#color_changer:hover {
background-color: red;
}
#size_changer {
width: 100px;
height: 100px;
background-color: blue;
-webkit-transition-property: width, height; /* Safari */
-webkit-transition-duration: 2s;
transition-property: width, height;
transition-duration: 2s;
}
#size_changer:hover {
width: 200px;
height: 200px;
}
#rotation_changer {
width: 100px;
height: 100px;
background-color: purple;
-webkit-transition-property: transform; /* Safari */
-webkit-transition-duration: 3s;
transition-property: transform;
transition-duration: 3s;
}
#rotation_changer:hover {
-ms-transform: rotate(180deg); /* IE 9 */
-webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */
transform: rotate(180deg);
}
#length_changer {
width: 100px;
height: 100px;
background-color: blue;
-webkit-transition-property: height; /* Safari */
-webkit-transition-duration: 2s;
transition-property: height;
transition-duration: 2s;
}
#length_changer:hover {
height: 200px;
}
</style>
</head>
<body>
<div id="color_changer"></div>
<div id="size_changer"></div>
<div id="rotation_changer"></div>
<div id="length_changer"></div>
</body>
</html>