Advertisement
Ignbaltasevicius

CSS code: rainbow start

May 27th, 2020
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. body {
  2. animation: colorchange 1s; /* animation-name followed by duration in seconds*/
  3. /* you could also use milliseconds (ms) or something like 2.5s */
  4. -webkit-animation: colorchange 1s; /* Chrome and Safari */
  5. }
  6.  
  7.  
  8.  
  9. @keyframes colorchange
  10. {
  11. 0% {background: red;}
  12. 25% {background: yellow;}
  13. 50% {background: blue;}
  14. 75% {background: green;}
  15. 100% {background: red;}
  16. }
  17.  
  18.  
  19. @-webkit-keyframes colorchange /* Safari and Chrome - necessary duplicate */
  20. {
  21. 0% {background: red;}
  22. 25% {background: yellow;}
  23. 50% {background: blue;}
  24. 75% {background: green;}
  25. 100% {background: red;}
  26.  
  27. {
  28. background-image: url("https://www.animatedimages.org/data/media/56/animated-computer-image-0254.gif");
  29. background-color: #cccccc;
  30. }
  31.  
  32. #grad {
  33. background-image: radial-gradient(red, green, blue);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement