Box shadow animation - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:box-shadow

Description

Box shadow animation

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

a {<!--from   ww w  .j  a  v  a2  s  .  c o m-->
   padding: 6px;
   display: block;
   width: 50px;
   font-size: 17px;
   margin: 10px auto;
   border: 2px solid;
   text-decoration: none;
   box-shadow: 0 0 0 rgba(204,169,44, 0.4);
   animation: pulse 2s infinite;
}
.btn-500 {
   animation-delay: 0.6s;
}
.btn-1250 {
   animation-delay: 1.3s;
}
@keyframes pulse {
   0% {
      -moz-box-shadow: 0 0 0 0 rgba(204,169,44, 0.4);
      box-shadow: 0 0 0 0 rgba(204,169,44, 0.4);
   }
   70% {
      -moz-box-shadow: 0 0 0 10px rgba(255,208,0, 0.2);
      box-shadow: 00 0 0 10px rgba(255,208,0, 0.2);
   }
   100% {
      -moz-box-shadow: 0 0 0 0 rgba(204,169,44, 0);
      box-shadow: 0 0 0 0 rgba(204,169,44, 0);
   }
}


      </style> 
 </head> 
 <body> 
  <a class="btn-100" href="#">100</a> 
  <a class="btn-500" href="#">500</a> 
  <a class="btn-1250" href="#">1250</a>  
 </body>
</html>

Related Tutorials