网站背景的线性渐变不适用于chrome(适用于Android 8+)

时间:2019-05-05 10:45:25

标签: android css google-chrome

我在使webkit-linear-gradient能够在带有chrome 73的android 8.1上工作时遇到麻烦。我有以下css类,在该类中,我试图使背景图像变暗,以使其上方的文本更清晰。它适用于台式机chrome和android上的Firefox,但不适用于android上的chrome。我在这里检查了其他类似的问题,例如(CSS3 linear-gradient not working on android.)和许多其他问题,但到目前为止还没有运气。

.site-wrapper {
    background-image: -moz-linear-gradient(top, rgba(28,28,28,0.65) 0%, rgba(19,19,19,0.65) 100%),
        url(img/photo_site.jpg); /* FF3.6-15 */
    background-image: linear-gradient(to bottom, rgba(28,28,28,0.65) 0%,rgba(19,19,19,0.65) 100%),
        url(img/photo_site.jpg); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a61c1c1c', endColorstr='#a6131313', GradientType=0 ); /* IE6-9 */
    background-image: -webkit-linear-gradient(left, transparent, black 50%, transparent),
        url(img/photo_site.jpg);

    background-attachment: fixed;
    z-index: 1;
}

感谢您的帮助。

0 个答案:

没有答案
相关问题