Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS3 box-shadow Property Animation</title> <style> .box { width: 300px; padding: 40px 0; font: bold 46px sans-serif; text-align: center; background: #ccc; border: 1px solid #999; -webkit-animation: test 4s infinite; /* Chrome, Safari, Opera */ animation: test 4s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes test { 50% {box-shadow: 8px 8px 16px #999;} } /* Standard syntax */ @keyframes test { 50% {box-shadow: 8px 8px 16px #999;} } </style> </head> <body> <p><strong>Warning:</strong> CSS animations do not work in Internet Explorer 9 and earlier versions.</p> <p><strong>Note:</strong> The box-shadow property of the following DIV element is animating from its initial value "none" to "8px 8px 16px #999", and back to the initial value "none" again up to infinite times.<p> <div class="box">Box</div> </body> </html>