-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransform&trasition.html
90 lines (78 loc) · 2.09 KB
/
transform&trasition.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
font-size: 62.5%; /*10px*/
}
.wrapper {
margin: 3.0rem;
display: grid;
grid-gap: 20px;
}
.box-container {
width: 500px;
height: 400px;
outline: 1px dashed black;
display: grid;
grid-template-rows: auto;
grid-template-columns: repeat(6, 1fr);
justify-items: center;
align-items: center;
}
.box {
width: 50px;
height: 50px;
background-color: rgb(103, 119, 183);
display: grid;
justify-content: center;
align-items: center;
}
.box-1:hover {
transform: translate(20px, 4rem);
}
.box-2:hover {
transform: rotate(-70deg);
}
.box-3:hover {
transform: skew(45deg, -70deg);
}
.box-4:hover {
transform: scale(1.5);
}
.box-5:hover {
transform: matrix(1, 0.5, -0.4, 1, 100, 50)
}
.box-6:hover {
transform: perspective(500px) rotateX(45deg);
}
.box {
/* transition-property: all;
transition-duration: 0.8s;
transition-timing-function: linear;
transition-delay: 0.2s; */
transition: all 0.8s linear 0.3s;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="box-container">
<div class="box box-1">box 1</div>
<div class="box box-2">box 2</div>
<div class="box box-3">box 3</div>
<div class="box box-4">box 4</div>
<div class="box box-5">box 5</div>
<div class="box box-6">box 6</div>
</div>
</div>
</body>
</html>