什么是CSS prefixes的目的是什么? [英] What is the purpose of CSS prefixes?

查看:197
本文介绍了什么是CSS prefixes的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,如果我们要确保一些CSS3特性工作等着我们需要使用$ P $的W3C pfixed版本推荐一个像:

I know that if we want to make sure some CSS3 features work everywhere we need to use the prefixed versions of the W3C recommended one like:

transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-webkit-transition: all 1s ease;

我知道,prefixes被用于实验的功能,但为什么他们有必要吗?他们为什么不对其进行测试的原始W3C吗?是否每个CSS3功能已经或有preFIX每一个浏览器或者他们只是创造一个prefixed版本,如果他们认为他们应该?

I know that the prefixes are used for experimental features, but why are they necessary? Why don't they test them on the original W3C one? Does every CSS3 feature has or had a prefix for every browser or they just create a prefixed version if they think they should?

推荐答案

厂商prefixes的最初目的是为供应商提供给自己加非标准的特性用在自己的CSS实现的能力。然而,大部分都是用于实验的东西版本的最终成为标准。

The original purpose of vendor prefixes was to give vendors the ability to add their own non-standard features for use in their CSS implementations. However, most of them are used for experimental versions of things that eventually become standards.

如果一个实验性质是未prefixed,这意味着这是一个属性的正确,标准版。如果每个浏览器呈现不同的看法,那么就没有太大的标准。取而代之的是,浏览器避免了实施一个未prefixed财产,直到它确保它这样做,根据标准,那么它开始支持pfixed财产的话说,它正确地支持该特定标准的方式未$ P $。

If an experimental property is unprefixed, it implies that it's the correct, standard version of a property. If every browser renders it differently, then there isn't much of a standard. Instead, a browser avoids implementing an unprefixed property until it's sure that it's done so according to the standard, then it starts supporting the unprefixed property as a way of saying it supports this particular standard correctly.

不是每一个功能都有preFIX;事实上,供应商创建只有当它认为有必要的。

Not every feature has a prefix; indeed, a vendor creates a prefix only if it deems it necessary.

这篇关于什么是CSS prefixes的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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