【CSS】Curtain animation that slides the color on top of the image from top to bottom | Demo page

※Please check using Developer tools

Sponsored links

CSS

.block {
  position: relative;
  display: block;
  width: 768px;
  margin: 50px auto 0;
}

.block img {
  width: 100%;
}

.block:after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #55310e;
  transition: height 1.0s cubic-bezier(1, 0, 0, 1);
}

.active.block:after {
  height: 0;
}

@media screen and (max-width:640px){
  .block {
    width: 100%;
  }
}

JavaScript

$(window).on('load', function(){
  $(".block").addClass("active");
});