我的渐变在iPhone上的Safari中不起作用。是否有可添加用于不同浏览器的Webkit?当我删除渐变时,我的图像出现在iPhone上。
.serv-bg {
background: linear-gradient(rgba(17, 28, 36), rgba(119, 201, 212, .1)), url(/images/service-main.jpg) no-repeat center center /cover;
border-left: 10px solid white !important;
border-top: 10px solid white !important;
border-bottom: 10px solid white !important;
border-right: 5px solid white !important;
height: 70vh;
}
答案 0 :(得分:1)
如果将-webkit
和-image
添加到CSS中,则可能会起作用:
.serv-bg {
background-image: -webkit-linear-gradient(rgba(17, 28, 36), rgba(119, 201, 212, .1)), url(/images/service-main.jpg) no-repeat center center /cover;
border-left: 10px solid white !important;
border-top: 10px solid white !important;
border-bottom: 10px solid white !important;
border-right: 5px solid white !important;
height: 70vh;
}