微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

autoprefixer

编程之家收集整理的这个编程导航主要介绍了autoprefixer编程之家,现在分享给大家,也给大家做个参考。

autoprefixer 介绍

css3书写的时候,有时需要加上前缀,比如“-webkit-*、-moz-*”等等,但可能会写的不完整或者是写错,也很麻烦,那么autoprefixer可以处理这些。

autoprefixer是一个后处理程序,不象Sass以及Stylus之类的预处理器。它适用于普通的css,可以实现css3代码自动补全。比如:

a{

display : flex;

}

处理后: 

a{

display : -webkit-Box;

display : -webkit-flex;

display : -moz-Box;

display : -ms-flexBox;

display : flex;

}

autoprefixer同样会清理过期的前缀,如: 

div{

-webkit-border-radius: 5px;

border-radius: 5px;

}

编译后:

div{

border-radius: 5px;

}

autoprefixer在编译css的同时,也会修复语法差异。这种方式,css是基于最新W3C规范产生。

 

 

网站地址:https://twitter.com/autoprefixer

GitHub:https://github.com/postcss/autoprefixer

网站描述:适用于普通的CSS,可以实现css3代码自动补全

autoprefixer

官方网站:https://twitter.com/autoprefixer

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。