HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> body{ background: #f2f2f2 url("red.png") no-repeat fixed center; animation: myAnimation 5s infinite; -webkit-animation: myAnimation 5s infinite; /* Safari 4.0 - 8.0 */ } @keyframes myAnimation { 50% {background: #f2f2f2 url("yellow.png") no-repeat fixed center; } } /* Safari 4.0 - 8.0 */ @-webkit-keyframes myAnimation { 50% {background: #f2f2f2 url("yellow.png") no-repeat fixed center; } } </style> </head> <body> <h1>CSS Animatable background</h1> </body> </html>
OUTPUT
×

Save as Private