-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransforms.html
More file actions
56 lines (55 loc) · 1.29 KB
/
transforms.html
File metadata and controls
56 lines (55 loc) · 1.29 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Transforms</title>
<style type="text/css">
body {
background-color: LightGrey;
padding-top: 100px;
}
div {
margin: 0 auto;
width: 300px;
border: 2px solid black;
border-radius: 10px;
text-align: center;
}
#translate:hover {
transform: translate(-45%, 0);
background-color: red;
color: white;
transition: all 2s ease-in;
}
#rotate {
}
#rotate:hover {
margin-top: 120px;
transform: rotate(45deg);
background-color: red;
color: white;
transition: background-color 3s ease-in, transform 2.5s ease-in-out, margin-top 4s ease-out;
}
#scale:hover {
margin-top: 70px;
transform: scale(2.2, 2.2);
background-color: red;
color: white;
transition: background-color 3s ease-in, transform 2.5s ease-in-out, margin-top 2s linear;
}
#skew:hover {
margin-top: 60px;
background-color: red;
color: white;
transform: skew(0, 20deg);
transition: margin-top 5s step-end, transform 3s step-start, background-color 2s linear;
}
</style>
</head>
<body>
<div><h2>Box</h2></div>
<div id="translate"><h2>Hover to translate</h2></div>
<div id="rotate"><h2>Hover to rotate</h2></div>
<div id="scale"><h2>Hover to scale</h2></div>
<div id="skew"><h2>Hover to skew</h2></div>
</body>
</html>