-
Notifications
You must be signed in to change notification settings - Fork 264
Expand file tree
/
Copy pathstyle.css
More file actions
66 lines (60 loc) · 1.33 KB
/
style.css
File metadata and controls
66 lines (60 loc) · 1.33 KB
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
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
:root {
--border-width: 3px;
}
* {
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
overflow: hidden;
margin: 0;
background: #222;
}
.gradient-border {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 500px;
height: 400px;
font-family: 'Roboto', sans-serif;
font-size: 2.5rem;
text-transform: uppercase;
color: white;
background: #222;
border-radius: var(--border-width);
}
.gradient-border::after {
position: absolute;
content: '';
top: calc(-1 * var(--border-width));
left: calc(-1 * var(--border-width));
z-index: -1;
width: calc(100% + var(--border-width) * 2);
height: calc(100% + var(--border-width) * 2);
background: linear-gradient(
60deg,
hsl(224, 85%, 66%),
hsl(269, 85%, 66%),
hsl(314, 85%, 66%),
hsl(359, 85%, 66%),
hsl(44, 85%, 66%),
hsl(89, 85%, 66%),
hsl(134, 85%, 66%),
hsl(179, 85%, 66%)
);
background-size: 300% 300%;
background-position: 0 50%;
border-radius: calc(2 * var(--border-width));
animation: moveGradient 4s alternate infinite;
}
@keyframes moveGradient {
50% {
background-position: 100% 50%;
}
}