HTML CSS examples for CSS Animatable Property:clip
In the following code the clip property of the following image is animating from its initial value "auto" to "rect(50px,250px,200px,0)", and back to the initial value "auto" 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 clip Property Animation</title> <style type="text/css"> img {<!-- w ww .ja va 2s .c o m--> position: absolute; /* Required for clipping */ -webkit-animation: test 4s infinite; animation: test 4s infinite; } @-webkit-keyframes test { 50% {clip: rect(50px,250px,200px,0);} } @keyframes test { 50% {clip: rect(50px,250px,200px,0);} } </style> </head> <body> <p> </p> <p><img src="https://www.java2s.com/style/demo/Opera.png" width="500" height="300" alt="Sky"></p> </body> </html>