-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathballs-transition.html
79 lines (65 loc) · 1.37 KB
/
balls-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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<title>CSS Transition</title>
<style>
body {
display: flex;
justify-content: space-around;
align-items: center;
height: 100vh;
}
.box-red,
.box-green,
.box-blue,
.box-yellow {
width: 100px;
height: 100px;
border-radius: 100%;
}
.box-red {
background-color: #f00;
}
.box-red:hover {
background-color: #ff0;
transition: background-color;
transition-duration: 1s;
transition-timing-function: ease-in;
transition-delay: 0s;
}
.box-green {
background-color: #0f0;
transition: width 1s linear 0s;
}
.box-green:hover {
width: 200px;
transition: width 1s linear 0s;
}
.box-blue {
background-color: #00f;
transition: all 3s ease 3s;
}
.box-blue:hover {
background-color: rgb(255, 0, 208);
width: 300px;
height: 300px;
border-radius: 8px;
transition: all 1s cubic-bezier(.29, 1.01, 1, -0.68) 0s;
}
.box-yellow {
background-color: #ff0;
transition: opacity 1s linear 0s;
}
.box-yellow:hover {
opacity: 0;
transition: opacity 1s linear 0s;
}
</style>
</head>
<body>
<div class="box-red"></div>
<div class="box-green"></div>
<div class="box-blue"></div>
<div class="box-yellow"></div>
</body>
</html>