Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS visibility Property Animation</title> <style> .animated { width: 150px; visibility: visible; padding: 40px 0; font: bold 46px sans-serif; text-align: center; background: #da70d6; border: 1px solid #a42b9d; -webkit-animation: test 4s infinite; /* Chrome, Safari, Opera */ animation: test 4s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes test { 50% {visibility: hidden;} } /* Standard syntax */ @keyframes test { 50% {visibility: hidden;} } </style> </head> <body> <p><strong>Note:</strong> As per W3C specification CSS visibility is an animatable property, however, it doesn't animate like other animatable properties.<p> <div class="animated">Box</div> </body> </html>