【CSS】How to implement an opening animation that slides multiple diagonal lines horizontally to fill the window size before displaying the page when accessing the page(Demo page)

※Please check using Developer tools

Dummytext01

Sponsored links

CSS

.wrap {
  margin: 200px 0 0;
  text-align: center;
}

.color {
  opacity: 0;
}

.load-01.color {
  opacity: 1;
}

.block{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  margin: -130vmax;
  padding: 130vmax;
  transform: skew(0, -45deg) scale(0);
}

.line-01 {
  transition: all 1.1s cubic-bezier(0.2, 0.6, 0.4, 1);
}

.line-02 {
 transition: all 1.1s 0.04s cubic-bezier(0.2, 0.6, 0.4, 1);
}

.line-03 {
  transition: all 1.1s 0.1s cubic-bezier(0.2, 0.6, 0.4, 1);
}

.load-01.color .block {
  transform: skew(0, -45deg) scale(1.5);
}

.load-02.color .block {
  top: auto;
  left: auto;
  bottom: 0;
  right: 0;
  transform: skew(0, -45deg) scale(0);
}

.line-01 {
  background: #d80505;
}
.line-02 {
  background: #ecec0f;
}
.line-03 {
  background: #fff;
}

.text {
  font-size: 30px;
}
  

JavaScript

$(function(){
  $('.color').addClass('load-01');
   setTimeout(function(){
    $('.color').addClass('load-02');
   },1000);
   setTimeout(function(){
     $(".color").removeClass('load-01 load-02');
   },1300);
});