最常见的 CSS3 属性是否还需要供应商特定的样式前缀?
我想我们大多数人都习惯用供应商特定的前缀编写常见的 CSS3 属性来支持所有浏览器,所以看到这样的东西并不罕见:
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-o-border-radius: 6px;
我最近注意到,在大多数常见属性上不再需要前缀。考虑到当前浏览器的快速更新周期,我开始考虑保留前缀的必要性 - 例如,可能没有多少 Chrome 版本不支持本机 border-radius
语法。
另外,我一直认为这些属性只是养眼,所以我认为在这方面放弃对现已过时的 Firefox 3.* 等的支持不会有任何问题。
那么,删除大多数常见属性(即 border-radius
和 box-shadow
)上的前缀是否安全?
I guess most of us are used to write common CSS3 properties with vendor specific prefixes to support all browsers, so it's not uncommon to see something like this:
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-o-border-radius: 6px;
I recently noticed that on most common properties the prefix is not required any more. And given the rapid update cycle of current browsers, I started to think about the necessity of keeping the prefixes - e.g. there probably are not many versions of Chrome still in the wild that do not support the native border-radius
syntax.
Also I've always thought of these kind of properties as just eye candy, so I don't think there would be any problem about dropping support for the now obsolete Firefox 3.* and the likes in this regard.
So, is it safe to drop the prefixes on most common properties, namely border-radius
and box-shadow
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论