teenagegoths

rainbow text

Sep 20th, 2021 (edited)
1,368
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <style>
  2. @keyframes slide {
  3. 0% {
  4. background-position-x: 0%;
  5. }
  6. 100% {
  7. background-position-x: 300vw;
  8. }
  9. }
  10. body {
  11. margin: 0;
  12. overflow: hidden;
  13. color: white;
  14. }
  15. .rainbow {
  16. background-size: 300vw 300vw;
  17.  
  18. margin: 0;
  19. position: relative;
  20. text-align: -webkit-center;
  21. font-size: 3em;
  22. background: repeating-linear-gradient(-45deg, red 0%, yellow 7.14%, #0f0 14.28%, #0ff 21.42%, cyan 28.56%, blue 35.7%, magenta 42.84%, red 50%);
  23.  
  24. -webkit-animation: 'slide' 10s infinite linear forwards;
  25. -webkit-text-fill-color: transparent;
  26. -webkit-background-clip: text;
  27. }
  28. </style>
RAW Paste Data