我有一个div填充整个页面(投资组合风格).在div具有这种风格:
.image-head {
background: url('http://placehold.it/1920x1080') no-repeat top center fixed;
background-size: cover;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
color: black;
text-align: center;
}
Run Code Online (Sandbox Code Playgroud)
基本上,我想要做的是每X秒改变它的背景图像url的div点数,但我不确定如何做到这一点.
我的标记目前看起来像这样:
<div class="image-head">
<div class="centering-hack">
<h1>Something HTML</h1>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
这里最简单/最好的解决方案是什么?
谢谢!
编辑:如果JS库让任何事情变得更容易,我正在使用Bootstrap 3