线性渐变(rgba)在iPhone上的Safari中不起作用

时间:2019-01-29 16:54:08

标签: jquery html css twitter-bootstrap

我的渐变在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;
}

1 个答案:

答案 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;
}

相关问题