JSFiddle - React, Tailwind, and code Playground
HTML
<div class="slider">
<div class="inner"></div>
<div class="inner light"></div>
</div>
CSS
@keyframes move-bg {
from {
background-position: 0% 0%;
}
to {
background-position: 150% 0%;
}
}
@keyframes lightup {
0% {
opacity:0;
}
50% {
opacity:1;
}
100% {
opacity:0;
}
}
.slider {
position: relative;
width: 1040px;
height: 311px;
overflow: hidden;
}
.inner {
position: absolute;
left:0;
right:0;
top:0;
bottom:0;
background-image: url(http://dreamsynk.com/img/VirtualTour_NormalLighting.jpg);
background-position: 0% 0%;
background-repeat: repeat;
animation: move-bg 6s infinite;
animation-delay: 0s;
animation-play-state: running;
animation-timing-function:linear;
}
.inner.light {
background-image: url(http://dreamsynk.com/img/VirtualTour_ExtraLighting.jpg);
opacity:0;
background-position: 0% 0%;
background-repeat: repeat;
animation:move-bg 6s infinite, lightup 1s infinite;
animation-delay: 0s;
animation-play-state: running;
animation-timing-function:linear;
}