如何获得线性渐变效果对mozilla firefox [英] How to get Linear gradient effect on mozilla firefox

查看:122
本文介绍了如何获得线性渐变效果对mozilla firefox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的css来获得线性渐变效果,但它不工作在mozilla firefox,你可以知道它的任何人都有帮助,以获得相同的效果在Firefox 3.0。
b $ b css

I am using the following css to get the linear gradient effect, But its not working in mozilla firefox, Can anyone of you know it pls help to get the same effect in firefox also.

The css is

background-image: -webkit-linear-gradient(bottom,rgba(0,0,0,.65) 0,transparent);


推荐答案

使用-moz-线性渐变:

Use -moz-linear-gradient:

background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, .65) 0,transparent);

运行演示

W3C版本语法略有不同:

And the W3C version with a slightly different syntax:

background-image: linear-gradient(to top, rgba(0, 0, 0, .65) 0, transparent);

运行演示

您应始终使用供应商特定的前缀(-o,-moz等)的W3C一。为防止自己编写,您可以使用 编译时前缀 ,例如 Nettus + Prefixr 实时前缀 ,例如 Lea Verou的前缀免费

You should always use vendor specific prefixes (-o, -moz, and so on) before the W3C one. To prevent writing them by yourself, you can use a compile-time prefixer, like Nettus+ Prefixr, or a real-time prefixer, like Lea Verou's Prefix free.

在渐变的特定情况下,您可以使用这个伟大的渐变生成器,为它们添加前缀。

In the specific case of Gradients, you can use this great Gradient Generator that prefixes them for you.

这篇关于如何获得线性渐变效果对mozilla firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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