CodePen

HTML

            
              <div class="what"></div>
            
          
!
via HTML Inspector

CSS

            
              body
{
   background:blue;
}

@-moz-keyframes inOut
{
  0% {
    box-shadow: none;
  }
  25% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black;
  }
  50% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black;
  }
  75% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black;
  }
  100% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black,
                0 0 0 70px white,
                0 0 0 80px black;
  }
}
@-o-keyframes inOut
{
  0% {
    box-shadow: none;
  }
  25% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black;
  }
  50% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black;
  }
  75% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black;
  }
  100% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black,
                0 0 0 70px white,
                0 0 0 80px black;
  }
}

@-moz-keyframes inOut
{
  0% {
    box-shadow: none;
  }
  25% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black;
  }
  50% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black;
  }
  75% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black;
  }
  100% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black,
                0 0 0 70px white,
                0 0 0 80px black;
  }
}
@-webkit-keyframes inOut
{
  0% {
    box-shadow: none;
  }
  25% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black;
  }
  50% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black;
  }
  75% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black;
  }
  100% {
    box-shadow: 0 0 0 10px white,
                0 0 0 20px black,
                0 0 0 30px white,
                0 0 0 40px black,
                0 0 0 50px white,
                0 0 0 60px black,
                0 0 0 70px white,
                0 0 0 80px black;
  }
}



.what {
  margin: 20% auto;
  
  width: 100px;
  height: 100px;
  background: black;
  border-radius: 100%;
  
  -moz-animation-name: inOut;
  -moz-animation-duration: 1000ms;
  -moz-animation-timing-function: linear;
  -moz-animation-iteration-count: infinite;
  -moz-animation-direction: alternate;
  
  -o-animation-name: inOut;
  -o-animation-duration: 1000ms;
  -o-animation-timing-function: linear;
  -o-animation-iteration-count: infinite;
  -o-animation-direction: alternate;
  
  -webkit-animation-name: inOut;
  -webkit-animation-duration: 1000ms;
  -webkit-animation-timing-function: linear;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-direction: alternate;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              //original pen by @Rafay Shaukat 
//modified by yogeshwaran
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................