sublime text 配置自动前缀插件Autoprefixer 使用配置方法浏览器兼容css样式

来源:互联网 发布:usb电流检测软件 编辑:程序博客网 时间:2024/06/01 08:03

0、确保Node.js已经安装,未安装请自行安装,并配置到全局环境变量,这个是前提!

1、安装插件:

“Ctrl + Shift + P”> 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" }

注意了,这个插件只能在.css文件和.scss文件里面使用!在html混编cssd的文件里面无效!

0 0