CSS3:我们还需要使用浏览器前缀吗? [英] CSS3: Do we still need to use browser prefixes?

查看:449
本文介绍了CSS3:我们还需要使用浏览器前缀吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们仍然需要为css3属性使用浏览器前缀,例如 -moz-box-shadow -moz-transition:all

Do we still need to use the browser prefixes for css3 properties, for example -moz-box-shadow, -moz-transition: all 0.3s ease-out; etc?

推荐答案

需要考虑的一个重要的事情是,如果您正在使用供应商前缀,那么您明确使用一个实验功能 - 不仅该属性不能在您定位的旧版本的浏览器中工作,因此不应该用于任何必要的,但它们也可能更改。您实际上不应在生产环境中使用实验功能。

An important thing to take into consideration is that if you are using Vendor Prefixes, then you are clearly using an experimental feature - not only will this property not work in older versions of the browsers you're targeting, and should thus not be used for anything essential, but they are also subject to change. You really shouldn't use experimental features in a production environment.

要回答您的问题,如果您要定位的浏览器只支持供应商加前缀的版本CSS属性,那么是的,你确实需要这样做。但是,如果您还包含非供应商前缀的版本,则所有浏览器最终都会支持该声明。

To answer your question, if you want to target a browser that only supports a vendor-prefixed version of the CSS property, then yes, you do need to do that. However, if you include a non-vendor-prefixed version of it as well, then all browsers will support that declaration eventually.

这篇关于CSS3:我们还需要使用浏览器前缀吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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