JSFiddle - React, Tailwind, and code Playground

HTML

<div class="test"><span>CONTENT</span></div>

CSS

.test
{
    width: 400px;
    height: 150px;
    position: relative;
    border: 1px solid green;
}

.test:before, .test:after {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    opacity: 1;
}
.test:before {
    background-image: url(http://placekitten.com/200/200);
    z-index: -1;
    transition: opacity 2s;
}

.test:after {
    background-image: url(http://placekitten.com/200/300);
    z-index: -2;
}
.test:hover {
}
.test:hover:before {
    opacity: 0;
}
span {
    color: white;
    font-size: 50px;
}