visibility - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:visibility

Introduction

-webkit- prefix is for Chrome, Safari, Opera.

-moz- prefix is for Firefox.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS visibility Property Animation</title>
  <style type="text/css">
.animated {<!--from w ww  . jav a  2  s.  com-->
  width: 150px;
  visibility: visible;
  padding: 40px 0;
  font: bold 50px sans-serif;
  text-align: center;
    background: #da70d6;
    border: 1px solid #a42b9d;
    -webkit-animation: test 4s infinite; 
    animation: test 4s infinite;
}

@-webkit-keyframes test {
    50% {visibility: hidden;}
}

@keyframes test {
    50% {visibility: hidden;}
}
</style>
 </head>
 <body>
  <p> </p>
  <div class="animated">
   Box
  </div>
 </body>
</html>

Related Tutorials