Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wish to animate the background-color* of an element. In this particular way:
_____________________________________
[HTML]
[head]
.example-class {animation: name 2s infinite}
@keyframes example-class {10%{color:black;}100%{color:white;}}
[/head]



[body]
[h1 class="example-class"]example text has no background color or animation.
[/h1]
[/body]
[/HTML]
_____________________________________

How do I make animation* as the background-color* for [h1]?

What I have tried:

[head]
.example-class {animation: name 2s infinite}
@keyframes example-class {10%{color:black;}100%{color:white;}}
.h1-background { background-color: "example-class" }
[/head]
Posted
Updated 7-Dec-17 14:47pm
v3

1 solution

CSS Animatable[^] has a working example of animating background colour.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900