※Please check using Developer tools
.block {
position: relative;
display: block;
width: 768px;
line-height: 0;
margin: 50px auto 0;
}
.block img {
width: 100%;
}
.block:after {
content: "";
position: absolute;
right: 0;
top: 0;
z-index: 1;
display: block;
width: 100%;
height: 100%;
background: #55310e;
transition: width 1.5s cubic-bezier(0.25, 1, 0.25, 1);
}
.active.block:after {
width: 0;
}
@media screen and (max-width:640px){
.block {
width: 100%;
}
}
$(window).on('load', function(){
$(".block").addClass("active");
});