如今我们公司主要考虑最低ie8;我在做gulp-autoprefixer时在想其他浏览器如firefox/ios等主流浏览器我需要支持什么版本呢?
gulp.task("prefixer", function(){
gulp.src("app/css/**/*.css")
.pipe(autoprefixer(
{
browser: ['这个到底要考虑什么版本'],
cascade: false
}
))
.pipe(gulp.dest("dist"))
});
以下是文档里的,我不知道改怎么选才好:
Queries
You can specify the versions by queries (case insensitive):
last 2 versions: the last 2 versions for each major browser.
last 2 Chrome versions: the last 2 versions of Chrome browser.
> 5%: versions selected by global usage statistics.
> 5% in US: uses USA usage statistics. It accepts two-letter country code.
ie 6-8: selects an inclusive range of versions.
Firefox > 20: versions of Firefox newer than 20.
Firefox >= 20: versions of Firefox newer than or equal to 20.
Firefox < 20: versions of Firefox less than 20.
Firefox <= 20: versions of Firefox less than or equal to 20.
Firefox ESR: the latest [Firefox ESR] version.
iOS 7: the iOS browser version 7 directly.
not ie <= 8: exclude browsers selected before by this query. You can add not to any query.
Blackberry and Android WebView will not be used in last n versions. You should add them by name.
Browserslist works with separated versions of browsers. To use all versions of some browsers you can use for example Firefox > 0, but it is bad practice.
Browsers
Names are case insensitive:
Android for Android WebView.
BlackBerry or bb for Blackberry browser.
Chrome for Google Chrome.
Firefox or ff for Mozilla Firefox.
Explorer or ie for Internet Explorer.
Edge for Microsoft Edge.
iOS or ios_saf for iOS Safari.
Opera for Opera.
Safari for desktop Safari.
OperaMobile or op_mob for Opera Mobile.
OperaMini or op_mini for Opera Mini.
ChromeAndroid or and_chr for Chrome for Android (mostly same as common Chrome).
FirefoxAndroid or and_ff for Firefox for Android.
ExplorerMobile or ie_mob for Internet Explorer Mobile.
请大神帮我解答一下啊?谢谢了
如果要考虑PC端
['> 1%', 'Firefox >= 10', 'ie >= 9', 'iOS >= 4', 'Chrome >= 10'];
只考虑移动端
['Firefox >= 10', 'iOS >= 4', 'Chrome >= 10']
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。