HTML CSS examples for CSS Animatable Property:background
Make background color change frequently with animation
<html> <head> <title>Blink</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> @-webkit-keyframes blackWhite {<!-- ww w . j av a 2 s. c om--> 0% { background-color: red; } 50% { background-color: red; } 51% { background-color: black; } 100% { background-color: black; } } @-webkit-keyframes blackWhiteFade { 0% { background-color: red; } 50% { background-color: black; } 100% { background-color: red; } } .blinkdiv { height: 100px; background-color: black; -webkit-animation-name: blackWhite; -webkit-animation-iteration-count: infinite; -webkit-animation-duration: 2s; } </style> </head> <body> <div class="blinkdiv"> </div> </body> </html>