在编写css代码的时候总会需要兼容不同浏览器版本,这会耗费我们许多时间在添加浏览器内核前缀上。我们可以利用Autoprefixer插件去掉无意义的繁琐过程。
1、安装插件:
preferences -------package Control--------Install Package-------Autoprefixer ---------- Installing Successful
2、设置需要兼容的浏览器版本:
Preferences-------package setting-------AutoPrefixer-------Setting-User
{
"keys": ["alt+cmd+p"],
"command": "autoprefixer",
"browsers": ["last 20 versions"],
"cascade": true,
"remove": true
}
3、快捷键绑定:
Preferences-------Key Bindings-User
{ "keys": ["ctrl+alt+shift+p"], "command": "autoprefixer" }