【CSS】How to implement opening animation that displays page after moving thick line from bottom to top when accessing page(Demo page)

※Please check using Developer tools

Dummytext01

Sponsored links

CSS

.line {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  transition: all 1s 0s cubic-bezier(1,.2,1,1);
  transform: translateY(100%);
  background: #ffd012;
}

.mask {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: #fff;
  transition: all 1.5s 1s;
  opacity: 1;
}

.text {
  margin: 200px 0 0;
  text-align: center;
  font-size: 30px;
}

.active .line {
  transform: translateY(-120%);
}

.active .mask {
  opacity: 0;
  transform: translateY(-120%);
}

JavaScript

$(function(){
  $('body').addClass('active');
});