use variables for background colors

This commit is contained in:
j 2021-10-13 16:54:25 +01:00
commit 40b2e06c83
3 changed files with 34 additions and 6 deletions

View file

@ -1,3 +1,10 @@
:root {
--bg-color-1: #6666ff;
--bg-color-2: #0099ff;
--bg-color-3: #ffff00;
--bg-color-4: #ff3399;
}
@keyframes background_animation {
0%,100% {
background-position: 0 0;
@ -10,7 +17,7 @@
}
}
body {
background: linear-gradient(to right, #6666ff, #0099ff , #ffff00, #ff3399);
background: linear-gradient(to right, var(--bg-color-1), var(--bg-color-2) , var(--bg-color-3), var(--bg-color-4));
animation: background_animation 60s ease-in-out infinite;
background-size: 400% 100%;
color: #ddd;