【发布时间】:2018-09-21 22:44:36
【问题描述】:
如何在每次有人访问主页时更改背景图片?当前的背景图像是在 CSS 中控制的,而不是在 HTML 中,因此我们将不胜感激。
查看单个背景图片的 CSS:
header .container-fluid
{
background-image: url("../../images/The Connection at St-Martin-in-the-
Fields/Carousel image - med res The Connection -1067838.jpg");
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
padding-top: 36px;
}
【问题讨论】:
-
你可以用jquery中的图像路径制作一个数组,每次都选择一个随机图像吗?
-
谷歌怎么说?我想他知道这些东西
-
罗宾,你能帮我解决这个问题吗?
-
我的问题是 CSS 定义的背景图片
标签: jquery html css image background-image