How to use this anamated background css on parts of the page?

blow

Well-known member
Trusted Uploader
Jan 10, 2019
656
798
100
Hi i found this code to animate different colors, but when i put it on the custom css section of my wordpress site, it applys to the whole page.

body {
animation: colorchange 50s; /* animation-name followed by duration in seconds*/
/* you could also use milliseconds (ms) or something like 2.5s */
-webkit-animation: colorchange 50s; /* Chrome and Safari */
}

@keyframes colorchange
{
0% {background: red;}
25% {background: yellow;}
50% {background: blue;}
75% {background: green;}
100% {background: red;}
}

@-webkit-keyframes colorchange /* Safari and Chrome - necessary duplicate */
{
0% {background: red;}
25% {background: yellow;}
50% {background: blue;}
75% {background: green;}
100% {background: red;}
}


Source: https://codepen.io/metagrapher/pen/tgcLl


How do i make it so i can call it somthing like:
anamated-bk
Then use that class or id when im making pages in elementor. I know its something to do with changing it from body, but i cant work it out.
Any help would be great.
 

Saint Gabriel

Well-known member
Jan 3, 2020
2,998
3,049
113
Okay, great. It's a CSS for particles.

Nice that you have found out a quick solution. 😁
 

Forum statistics

Threads
69,477
Messages
909,884
Members
239,664
Latest member
شاكر

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu