有沒有一種方法,我可以輕鬆編譯更少的代碼到以下瀏覽器兼容的css代碼?less.js是否可以編譯與瀏覽器兼容的CSS代碼?
#grad1 {
background: -webkit-linear-gradient(red, blue); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(red, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(red, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(red, blue); /* Standard syntax (must be last) */
}
或者我必須手動執行嗎?
而且我知道我更少的代碼不按字母順序編制,我使用下面的命令行lessc (less file) (css file)
見['不太插件-autoprefix'](https://github.com/less/less-plugin-autoprefix)。 –