CSS背景图片不出现在Safari中 [英] CSS background image not appearing in Safari

查看:460
本文介绍了CSS背景图片不出现在Safari中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的任务应用背景图像到DIV。我可以查看图像与除Safari之外的其他浏览器。有人可以看看我的CSS和网站,并告诉我我做错了什么。

I have the very simple task of applying a background image to a DIV. I can view the image with every other browser except Safari. Can someone take a look at my CSS and site and tell me what I'm doing wrong.

CSS:

#intro2services {
    background:linear-gradient(rgba(0,0,0,1),rgba(0,0,0,0)), url(../img/colorpencils.jpg) fixed;
    background-position: 100% 100%;
    background-size: cover;
    background-repeat: no-repeat;
}

网站:
www.designedbysheldon.com

Site: www.designedbysheldon.com

推荐答案

这是Safari的一个已知问题。大多数时候,为你的风格添加一个负z-index将会解决这个问题。

This is a know issue with Safari. Most of the time, adding a negative z-index to your style, will solve the issue.

z-index:-1:

这篇关于CSS背景图片不出现在Safari中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆