-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
82 lines (77 loc) · 1.57 KB
/
style.css
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
body {
background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
background-size: 800% 800%;
animation: gradient 7S ease infinite;
overflow: hidden;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
25% {
background-position: 100% 50%;
}
50% {
background-position: 0% 50%;
}
75% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.center {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.button {
background-color: #000000;
color: #fff;
font-size: 12px;
border: 1px solid #000000;
padding: 10px 20px;
cursor: pointer;
}
img {
width: 500px;
animation: dance 5s infinite;
}
/* The animation code */
@keyframes dance {
0% {
transform: rotate(0deg) translateX(0);
}
10% {
transform: rotate(-10deg) translateX(-20px);
}
20% {
transform: rotate(10deg) translateX(-10px);
}
30% {
transform: rotate(-10deg) translateX(-20px);
}
40% {
transform: rotate(10deg) translateX(-10px);
}
50% {
transform: rotate(0deg) translateX(0);
}
60% {
transform: rotate(10deg) translateX(10px);
}
70% {
transform: rotate(-10deg) translateX(20px);
}
80% {
transform: rotate(10deg) translateX(10px);
}
90% {
transform: rotate(-10deg) translateX(20px);
}
100% {
transform: rotate(0deg) translateX(0);
}
}