css较少未被识别的陈述

时间:2011-11-14 19:14:15

标签: css less

我正在尝试通过css添加渐变。

我在旧版本的ie。

中有渐变线
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e4da9d, endColorstr=#c1b676);

然而,针对较少css的javascript解释器给出了该行的语法错误。有没有办法从解析中跳过该行,只是按原样输出。

1 个答案:

答案 0 :(得分:6)

使用

filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=#e4da9d, endColorstr=#c1b676)";

更多关于“逃避”的信息 - String Functions - CSS Escaping