Scanner Animation CSS3

In this example below you will see how to do a Scanner Animation CSS3 with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by jodacame, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright jodacame ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Scanner Animation CSS3</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="monitor">

  <div class="scan"></div>
  <div class="screen"></div>
  
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/jodacame/scanner-animation-css3-ozOpjJ */
#monitor{

  margin:auto;
  position:relative;
  width:220px;
  height:250px;
  border:1px solid rgba(0,0,0,.1);  
  
  
}
#monitor .screen
{
  margin:auto;
  margin-top:10px;
  width:200px;
  height:230px;
  background: transparent url('http://www.terminally-incoherent.com/blog/wp-content/uploads/2010/02/maketitle.jpg');
  background-size:cover;
  background-color: rgba(0,0,0,.2);
}

#monitor .scan
{
  width:100%;
  height:10px;
  background-color:rgba(0,0,0,.8);
  position:absolute;
  z-index:9999;
   -moz-animation: scan 5s infinite;
  -webkit-animation: scan 5s infinite;
  animation: scan 5s infinite;
   -webkit-animation-direction: alternate-reverse;
  box-shadow:0px 0px 30px rgba(255,204,102,.5);
  
  
}

@-webkit-keyframes scan {
  0%, 100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  100% {
    -webkit-transform: translateY(210px);
    transform: translateY(240px);
  }
}

Comments