美文网首页
autoprefixer自动添加前缀

autoprefixer自动添加前缀

作者: sunny519111 | 来源:发表于2016-12-29 14:45 被阅读142次

github地址

也可以点击这个然后搜索install

1.安装全局的autoprefixer

    npm *install* --global postcss-cli autoprefixer

2. 通过命令行调用

    postcss --use autoprefixer *.css -d build/

其中-d表示最终目的地(destination)这样会把文件存放在当前文件夹里面新建的build文件夹中

3.具体运用

  1. 如果我们要把d盘的autoprefixer文件夹下的css自动添加前缀


    切换d盘
  2. 运行postcss --use autoprefixer style.css -d build/
    在子目录下创建文件保存
    !查看生成的文件](https://img.haomeiwen.com/i3635292/bacedce86b75235e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

3.1. 切换文件的保存路径

    postcss --use autoprefixer try.css -d /f/build/

切换不同的路径

相关文章

网友评论

      本文标题:autoprefixer自动添加前缀

      本文链接:https://www.haomeiwen.com/subject/ycxpvttx.html