-
Notifications
You must be signed in to change notification settings - Fork 0
/
animations
73 lines (68 loc) · 1.59 KB
/
animations
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>animations</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- <div id="box">Hi</div>-->
<img src="shrek.png">
</body>
</html>
/* style.css */
body{
background-color: hsl(0, 0%, 12%);
}
#box{
width: 250px;
height: 250px;
background-color: hsl(0, 100%, 62%);
font-size: 13em;
text-align: center;
}
img{
animation-name: slideLeft;
animation-duration: 2s;
animation-iteration-count: 1;
animation-direction: normal;
animation-play-state: running;
animation-timing-function: cubic-bezier(0.28,-1.48, 0.54, 2.21);
}
@keyframes slideLeft{
from{transform: translateX(300%)}
}
@keyframes slideRight{
to{transform: translateX(300%)}
}
@keyframes slideUp{
from{transform: translateY(300%)}
}
@keyframes slideDown{
to{transform: translateY(300%)}
}
@keyframes rotate{
50%{transform: rotateZ(360deg)}
}
@keyframes grow{
50%{transform: scale(2, 2)}
}
@keyframes shrink{
50%{transform: scale(0.5, 0.5)}
}
@keyframes fade{
100%{opacity: 1}
}
@keyframes colorChange{
0%{background-color: hsl(0, 100%, 62%)}
20%{background-color: hsl(35, 100%, 62%)}
40%{background-color: hsl(63, 100%, 62%)}
60%{background-color: hsl(103, 100%, 62%)}
80%{background-color: hsl(201, 100%, 62%)}
100%{background-color: hsl(268, 100%, 62%)}
}
@keyframes glow{
50%{box-shadow: 0px 0px 50px hsl(60, 100%, 64%)}
}