JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
Here comes the images
</body>
</html>
JavaScript
(function($, interval, slides) {
var gradient = "linear-gradient(0deg,rgba(0,0,255,0.3),rgba(0,0,255,0.3))";
$('body').css("background", gradient+", url('" + slides[slides.length-1] + "')");
var i = 0;
var handle = setInterval(function () {
var bg = gradient+", url('" + slides[i] + "')";
$('body').css('background', bg);
i++;
if (i >= slides.length) {
i = 0;
}
}, interval);
})(jQuery, 5000, [
"https://source.unsplash.com/CgOaFB56Vyw/1920x1080",
"https://source.unsplash.com/18Q4c6EVf_o/1920x1080",
"https://source.unsplash.com/7uvHtSn5a90/1920x1080"
]);