Sign css animation

In this example below you will see how to do a Sign css animation with some HTML / CSS and Javascript

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

<head>
  <meta charset="UTF-8">
  <title>Sign css animation</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="container">
  <div class="sign"></div>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/tibomahe/sign-css-animation-RWGaJK */
.container {
  width: 400px;
  height: 50px;
  border: 1px solid red;
  position: relative;
  overflow: hidden;
}
.container .sign {
  display: block;
  background: #00a96d;
  width: 100px;
  height: 5px;
  position: absolute;
  top: 0;
  left: 0;
  animation: slide 2s infinite;
}

@keyframes slide {
  0% {
    transform: translate(-100%, 0);
  }
  100% {
    transform: translate(500%, 0);
  }
}

Comments