我使用作曲家安裝了「autoPrefixer PHP」,並嘗試瞭如github頁面(https://github.com/vladkens/autoprefixer-php)所示的示例。 很簡單的例子autoprefixer PHP不能正常工作,如示例
$autoprefixer = new Autoprefixer();
$css = 'a { transition: transform 1s }';
$prefixed = $autoprefixer->compile($css);
只輸出$ CSS不變。但是,如果我使用自定義參數啓動autprefixer對象,它會輸出正確的前綴css。
$autoprefixer = new Autoprefixer('last 2 versions');
還初始化與PARAMATERS對象如圖所示的例子中,給出「未知的瀏覽器要求「IE8」錯誤
$autoprefixer = new Autoprefixer(array('ff > 2', '> 2%', 'ie8')); // many rules
所以什麼都可以錯在我的安裝?事實上,我沒有手動做任何事情,只是由作曲家安裝。