-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathstyle.css
59 lines (55 loc) · 1.11 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
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #222;
}
.box {
font-size: 40px;
width: 10em;
height: 5em;
background-color: #111;
color: lime;
border-radius: 0.5em;
text-align: center;
line-height: 1.5em;
font-family: sans-serif;
display: flex;
align-items: center;
justify-content: center;
position: relative;
animation: animate_text 2s infinite alternate;
}
.box::before {
content: '';
position: absolute;
width: calc(100% + 1em);
height: calc(100% + 1em);
border-radius: inherit;
z-index: -1;
background-image: linear-gradient(
60deg,
aquamarine,
cornflowerblue,
goldenrod,
hotpink,
salmon,
lightgreen,
sandybrown,
violet);
background-size: 300%;
background-position: 0%, 50%;
animation: animate_bg 2.5s infinite alternate;
}
@keyframes animate_bg {
to {
background-position: 100%, 50%;
}
}
@keyframes animate_text {
to {
color: yellow;
}
}