create rainbow background
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
:root {
|
||||
--rainbow-duration: 8s;
|
||||
}
|
||||
|
||||
.rainbow-background { animation: rainbow-animation var(--rainbow-duration) infinite alternate; }
|
||||
|
||||
@keyframes rainbow-animation {
|
||||
0% { background-color: var(--blue); }
|
||||
16.7% { background-color: var(--green); }
|
||||
33.3% { background-color: var(--yellow); }
|
||||
50.0% { background-color: var(--orange); }
|
||||
66.7% { background-color: var(--red); }
|
||||
83.3% { background-color: var(--purple); }
|
||||
100% { background-color: var(--blue); }
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
rainbow.txt
|
||||
@@ -2,10 +2,14 @@ in the css
|
||||
|
||||
@import url("https://styles.alv.cx/modules/rainbow.css");
|
||||
|
||||
or
|
||||
|
||||
@import url("https://styles.alv.cx/modules/rainbow-background.css");
|
||||
|
||||
variables:
|
||||
|
||||
--rainbow-duration: 8s;
|
||||
|
||||
and add the class `rainbow` to any element you want.
|
||||
|
||||
it works by changing the `color` property of the element.
|
||||
it works by changing the `color` or `background-color` property of the element.
|
||||
|
||||
Reference in New Issue
Block a user