HTML CSS examples for CSS Animatable Property:outline-color
In the following code the outline-color property of the div element is animating from its initial value "#7d7de6" to "#4b0082", and back to the initial value "#7d7de6" again up to infinite times.
-webkit- prefix is for Chrome, Safari, Opera.
-moz- prefix is for Firefox.
<!DOCTYPE html> <html lang="en"> <head> <title>Example of CSS outline-color Property Animation</title> <style type="text/css"> .animated {<!--from w w w . j a va 2 s.c o m--> width: 200px; padding: 60px 0; margin: 100px; font: bold 50px sans-serif; background: #e6e6fa; outline: 20px solid #7d7de6; text-align: center; -webkit-animation: test 4s infinite; animation: test 4s infinite; } @-webkit-keyframes test { 50% {outline-color: #4b0082;} } @keyframes test { 50% {outline-color: #4b0082;} } </style> </head> <body> <p> </p> <div class="animated"> Box </div> </body> </html>