0

我有一个函数可以在 less 中应用渐变:

.linearGradient(@begin: black, @end: white, @switch : 100%) {
  background: @begin;
  background: -webkit-gradient(linear, 0 0, 0 100%, from(@begin), color-stop(@switch, @end));
  background: -moz-linear-gradient(top, @begin, @end @switch);
  background: -o-linear-gradient(top, @begin, @end @switch);
  background: linear-gradient(top, @begin, @end @switch);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=@top, endColorstr=@bottom,GradientType=0 ); /* IE6-9 */
}

我希望能够测试版本 < IE10 并使用过滤器,否则只需使用 css3。

编辑:附加问题有没有办法测试浏览器?

4

1 回答 1

0

不要费心做测试;IE10 不支持该filter属性。

于 2012-08-06T14:30:54.603 回答