※デベロッパーツール等でソースコードをご確認ください(Please check using Developer tools)
body {
background: #000;
}
.wrap {
height: 2000px;
}
.color {
position: fixed;
z-index: 100;
left: 0;
top: 0;
width: 100vw;
height: 100%;
}
.block {
position: absolute;
z-index: -1;
top: 0;
width: 0;
height: 100%;
transition: transform 1.5s .7s cubic-bezier(0,.7,.5,1);
}
.block.left {
left: 0;
}
.block.right {
right:0;
}
.block.left:after,
.block.right:after {
content: '';
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-color: transparent;
}
.block.left:after {
left: 0;
bottom: 0;
border-width: 100vw 0 0 100vw;
border-left-color: #fff;
}
.block.right:after {
right: 0;
top: 0;
border-width: 0 100vw 100vw 0;
border-right-color: #fff;
}
.show .block.left {
transform:translateX(-100vw);
}
.show .block.right {
transform:translateX(100vw);
}
@media screen and (max-width:640px){
.color {
display: none;
}
}
$(function(){
$('body').addClass('show');
setTimeout(function(){
$(".color").remove();
},2000);
});