问题
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 ...)
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 ?
回答1:
There are several options that come to mind, depending on your use-case:
- SASS with Bourbon
- SASS with Compass
Less with LESS elements
Emmet CSS3 Abbreviations (In your text editor)
PrefixFree (client side js)
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.
回答2:
Here is more
Sublimetext plugin https://github.com/sindresorhus/sublime-autoprefixer?source=c
回答3:
A nice vendor prefix mixin for doing that in SASS here for those that are using SASS
来源:https://stackoverflow.com/questions/13935761/how-to-automatically-add-browser-prefix-to-css3-properties