function setBackgroundColor(index) {
var blue1 = 'rgba(52, 152, 219, 0.8)';
var blue2 = 'rgba(41, 128, 185, 0.8)';
var dark1 = 'rgba(52, 73, 94, 0.8)';
var dark2 = 'rgba(44, 62, 80, 0.8)';
var gray1 = 'rgba(149, 165, 166, 0.8)';
var gray2 = 'rgba(127, 140, 141, 0.8)';
var white2 = 'rgba(189, 195, 199,1.0)';
var colors = [blue1, blue2, dark1, dark2, gray1, gray2, white2];
if (!index || index > (colors.length - 1)) {
index = 0;
}
var color = colors[index];
setTimeout(function() {
$('html').animate({
backgroundColor: color
}, 500);
setBackgroundColor(++index);
}, 30000);
}
$(document).ready(function() {
setBackgroundColor();
});
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme