我使用作曲家安装了“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
所以什么都可以错在我的安装?事实上,我没有手动做任何事情,只是由作曲家安装。