postCss

Posted by Bibooo on 09-16,2022

postCss

npm add --dev postcss postcss-cli 安装

npx postcss style.css -o dist.css 配置路径

npm add --dev autoprefixer  babel

packjson.js

 "dependencies": {
    "autoprefixer": "^10.4.11",
    "postcss": "^8.4.16",
    "postcss-cli": "^10.0.0"
  },
  "browserslist":[
    "cover 99.5%"
  ]
  设置低版本浏览器
npx postcss style.css -o dist.css -u autoprefixer
加前缀