css - javascript css3 change background color every 2 seconds -
How do I automatically change the HTML background color every 2 seconds? With HTML5 feed or feedout with CSS3?
I tried to use transition with timer and CSS target without any success
input [type = checkbox] {position: absolute; Top: -9999 pixels; Left: -9999px; } Labels {Display: Block; Background: # 08C; Padding: 5px; Border: 1 px solid RGBA (0,0,0, 1); Boundary-radius: 2px; White color; font-weight: bold; } Input [type = checkbox]: checked ~ To-to-replace {color: red; }
some changes work a difference on this In modern browsers, if you already know the number of colors and colors:
.animate-me {-webkit- animation: bgcolorchange 4s infinite; / * Chrome, Safari, Opera * / Animation: 4S Anant BG Colourb; } @Keframe BG ColorBab {0% {background color: red; } 25% {background color: green; } 50% {background-color: yellow; } 75% {background color: yellow; } 100% {background-color: red; }} * / * Chrome, Safari, Opera * / @ -WebKit-Keframe BG ColorBab {0% {background: red;} 25% {background: yellow;} 75% {background: green;} 100% {background: blue ;}}
& div; Div class = "animate-me" & gt; Tripy! Give me headache! & Lt; / Div & gt;
Click on the demo!
Comments
Post a Comment