【CSS】Animation that makes the color superimposed on the image slide diagonally from upper right to lower left | Demo page

Please check using Developer tools

Sponsored links

CSS

.block {
  position: relative;
  display: block;
  width: 768px;
  height: 100%;
  line-height: 0;
  overflow: hidden;
  margin: 50px auto 0;
}

.block img {
  width: 100%;
}

.block:after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  transform: skew(30deg);
  width: 205%;
  height: 205%;
  background: #fff;
}

.active.block:after {
  top: 350%;
  left: -350%;
  transition: all 1s cubic-bezier(.645, .045, .355, 1);
}

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

JavaScript

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