jquery - 我使用 div 添加了背景图像

标签 jquery html css

我已将背景图像添加到 div,但图像未显示,请帮我解决我所缺少的问题。 这是代码 CSS:

.riseImages
{
    position: absolute;
    top: 0px;
    width: 100%;
    height: 650px;
    overflow: hidden;
    z-index: 4;
    background-image: url("img\page1\bg shapes.png");
    background-repeat: repeat;
    background-size: initial;
    /*-webkit-animation-name: rise;
    -webkit-animation-duration: 18s;
    -moz-animation-delay: 18s;
    -webkit-animation-delay: 18s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;*/
}

html:

<div class="riseImages topRise"></div>
<div class="riseImages bottomRise"></div>

我没有得到想要的输出,背景图像没有显示,之前它工作正常。

最佳答案

使用 CSS:

background-image: url("img/page1/bg shapes.png");

关于jquery - 我使用 div 添加了背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32794208/

相关文章:

javascript - 鼠标位置的背景颜色变化在鼠标移动之前不加载

html - 设置了半混合模式的图像

html - 如何右对齐div内的固定位置div

php - 将mysql数据放入html中存在的div中

javascript - 如何在溢出隐藏父元素内显示绝对元素

html - CSS:如何放大一个div的子div并在调整屏幕大小时将两个图像设置为顶部和底部固定

javascript - jquery响应式wordpress slider 高度变化

javascript - 为什么 jquery 对这个选择器很生气?

jquery - 文本在我的侧边栏中重叠

javascript - 选择一个没有 "selected"属性的选择选项元素