线性梯度仅与-moz供应商前缀一起使用 [英] Linear-gradient works only with -moz vendor prefix

查看:145
本文介绍了线性梯度仅与-moz供应商前缀一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于此代码与-moz供应商前缀一起使用,我认为它可以与-webkit或-ms实例一起使用,但它似乎不允许它:

Since this code works with the -moz vendor prefix I thought it would work a well with -webkit or -ms for instance, but it doesn't seem to allow it:

background-image: -moz-linear-gradient(center top , rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.95) 100%);

我猜Mozilla允许不应该使用的东西,但是我的研究是现在...

I guess Mozilla is allowing something that shouldn't be used, but my research has been infructuous as of now...

任何想法?

推荐答案

code> center 。

Remove the center. Then it should work.

此外,请务必为所有浏览器使用它:

Also make sure you have it for all browsers:

background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.95) 100%);
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.95) 100%);
background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.95) 100%);
background-image: -ms-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.95) 100%);
background-image: linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.95) 100%);

示例小提琴

这篇关于线性梯度仅与-moz供应商前缀一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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