※デベロッパーツール等でソースコードをご確認ください(Please check using Developer tools)
.block {
position: relative;
display: block;
width: 700px;
line-height: 0;
margin: 50px auto 0;
}
.block:after,.block:before {
content: '';
display: block;
position: absolute;
top: 0;
height: 102%;
transition: transform 0.5s cubic-bezier(0.39, 0.575, 0.565, 1);
background: #fff;
}
.block:before {
width: 45%;
left: -1%;
transform-origin: left top;
}
.block:after {
width: 65%;
right: -1%;
transform-origin: right top;
}
.active.block:before,.active.block:after {
transform: scaleX(0);
}
@media screen and (max-width:640px){
.block {
width: 100%;
}
}
$(window).on('load', function(){
$(".block").addClass("active");
});