moving clouds

In this example below you will see how to do a moving clouds with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by navupawar, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright navupawar ©

Technologies

  • HTML
  • CSS
  • JavaScript
    <html>

<head>
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>

<body>
  <div class="mountain-image">
    <img class="img-responsive" src="http://luminoguruz.com/img/mount-everest-1.jpg">
    <div class="mountain-cloud"></div>
  </div>
</body>

</html>

/*Downloaded from https://www.codeseek.co/navupawar/moving-clouds-amWaKK */
    .mountain-image {
  position: relative;
  overflow: hidden;
}

.mountain-cloud {
  background-image: url('http://www.fibersensing.com/public/files/market/aerospace-clouds.png');
  animation: moveCloud 100s linear infinite;
  background-size: auto 100%;
  background-repeat: repeat-x;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
}

@-webkit-keyframes moveCloud {
  0% {
    background-position: 100px 0;
  }
  100% {
    background-position: 1500px 0;
    opacity: 0.9;
  }
}

@keyframes moveCloud {
  0% {
    background-position: 100px 0;
  }
  100% {
    background-position: 1500px 0;
    opacity: 0.9;
  }
}


/*Downloaded from https://www.codeseek.co/navupawar/moving-clouds-amWaKK */
    

Comments