0
我是一個新手,想問如何autoprefix semantic-ui的Less文件?根據文檔,Autoprefiximg語義UI
Add vendor prefixes for supported browsers with autoprefixer
我是一個新手,想問如何autoprefix semantic-ui的Less文件?根據文檔,Autoprefiximg語義UI
Add vendor prefixes for supported browsers with autoprefixer
Autoprefixer是,開發商在他們的工作流程整合,不能失去他們的頭腦試圖記住所有的供應商前綴流行的插件。鏈接如下:https://github.com/postcss/autoprefixer
如果您使用的是Sublime Text Editor,您也可以通過Package Manager進行安裝。在包的用戶首選項中,您可以選擇您想要支持的瀏覽器。例如:['> 5%', 'last 1 version']
Autoprefixer使用Browerlist來指定要定位到哪些瀏覽器。
因爲Autoprefixer是CSS後處理器,你還可以用它 與預處理器,如薩斯,手寫筆或更少。
您可以使用一種方法,而不是打開每個LESS文件並在其上應用Autoprefixer,該方法是使用gulp-less
插件。
下面是一個例子:
var LessAutoprefix = require('less-plugin-autoprefix');
var autoprefix = new LessAutoprefix({ browsers: ['last 2 versions'] });
return gulp.src('./less/**/*.less')
.pipe(less({
plugins: [autoprefix]
}))
.pipe(gulp.dest('./public/css'));
或者,OP可以簡單地使用glup.js文件,它是語義的UI安裝的一部分。那裏的各種任務在適當的時候使用autoprefixer。 – DFriend