如何自动添加浏览器前缀到CSS3属性? [英] How to automatically add browser prefix to CSS3 properties?

查看:601
本文介绍了如何自动添加浏览器前缀到CSS3属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你可能知道,因为CSS3不兼容所有的浏览器,当我们使用CSS3,我们应该添加一个前缀到CSS3属性(像-moz,-webkit,-o和...)

As you may be know, because CSS3 is not compatible with all of browsers when we use CSS3 we should add a prefix to CSS3 properties (like -moz, -webkit, -o and ...)

手动写这些前缀是很困难的。所以,有没有任何插件,程序或其他东西来检测CSS3属性在我的CSS文件,并附加必要的厂商前缀这些属性?

It is difficult to write these prefixes manually. So, is there any plugin, program or another thing to detect CSS3 properties in my CSS file and append necessary vendor prefixes to those properties ?

推荐答案

根据您的使用情况,有几种选择:

There are several options that come to mind, depending on your use-case:

Emmet
CSS3缩写
(在文本编辑器中)

PrefixFree (客户端js)

我个人的偏好是使用Compass,但如果你不想使用CSS预处理器的开销,Emmet缩写效果很好。

My personal preference is to use Compass, but the Emmet abbreviations work well if you do not want the overhead of using a CSS pre-processor.

这篇关于如何自动添加浏览器前缀到CSS3属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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