Autoprefixer是一個後處理程序,不象Sass以及Stylus之類的預處理器。它適用於普通的CSS,能夠實現css3代碼自動補全。也能夠輕鬆跟Sass,LESS及Stylus集成,在CSS編譯前或編譯後運行。詳情見,https://github.com/postcss/autoprefixercss
當Autoprefixer添加前綴到你的CSS,還不會忘記修復語法差別。這種方式,CSS是基於最新W3C規範產生:html
step1:安裝node.js
step2:安裝Autoprefixer node
npm install autoprefixer -g
step3:安裝postcss-cli css3
npm install postcss-cli -g
step4:設置webstorm External Toolsgit
打開webstorm->File->設置->搜索External Tools->點擊‘+’,設置Edit Toolgithub
Name:autoprefixer web
Tool settingsnpm
Program: 找到AppData下的文件postcss.cm 若找不到AppData,在地址欄輸入%appdata%回車便可app
Parameters:-u autoprefixer -o outputFile inputFile 注意文件順序輸出文件及輸入文件 ,輸入文件須要先新建,不能自動生成webstorm
Working directory:文件目錄便可,可根據本身須要調整
寫具體配置,例如個人配置,如圖:
在輸出文件中點擊右鍵->autoprefixer,
點ok
完成
在安裝包目錄下的node_modules\browserslist這個包裏
配置文件是index.js
個人目錄是: C:\Users\Administrator\AppData\Roaming\npm\node_modules\autoprefixer\node_modules\browserslist\index.js