JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div id="header"></div>
</body>
</html>
CSS
#header {
border: 1px solid green;
height: 256px;
width: 256px;
}
.image1 {
background-image: url('http://images4.wikia.nocookie.net/__cb20100429000907/jamescameronsavatar/images/e/e5/Google_Chrome_Icon.png');
}
.image2 {
background-image: url('http://pingvinoff.net/wp-content/uploads/2011/05/chroms.png');
}
JavaScript
setInterval(function(){
var m = new Date();
var time = m.getSeconds();
if (time == 19 || time == 39 || time == 59) {
document.getElementById('header').className = 'image1';
} else if (time == 15 || time == 30 || time == 45) {
document.getElementById('header').className = 'image2';
}
}, 1000)