Created
January 6, 2024 20:10
-
-
Save stringertheory/bc99e491efa0099d1f8972255742ed72 to your computer and use it in GitHub Desktop.
moving rainbow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
html { | |
font-size: 2rem; | |
/* font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif; */ | |
font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif; | |
} | |
@keyframes rainbow_animation { | |
0% { | |
background-position: 0% | |
} | |
100% { | |
background-position: 100% | |
} | |
} | |
.rainbow { | |
font-weight: 900; | |
letter-spacing: -0.0355rem; | |
/* font-weight: bold; */ | |
/* letter-spacing: -0.03rem; */ | |
/* letter-spacing: -0.09rem; */ | |
background: repeating-linear-gradient(90deg, #ff3b98, #f87600, #00c200, #00bcff, #9e77ff, #ff3b98, #f87600, #00c200, #00bcff, #9e77ff, #ff3b98); | |
-webkit-background-clip: text; | |
background-clip: text; | |
color: transparent; | |
animation: rainbow_animation 1s linear infinite reverse; | |
background-size: 200% 100%; | |
@media (prefers-reduced-motion) { | |
animation-play-state: paused; | |
} | |
&:hover, &:active { | |
animation-play-state: paused; | |
} | |
} | |
</style> | |
<p>Hi this is a <span class="rainbow">test of a moving rainbow style</span>.</p> | |
<p>Hi this is a test of a moving rainbow style.</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment