IE8中是否有针对CSS转换属性的polyfill [英] Is there polyfill for css transform property in IE8

查看:213
本文介绍了IE8中是否有针对CSS转换属性的polyfill的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下用于跨浏览器转换的mixin:

I have the following mixin for cross-browser transform:

.transform (...) {
    -webkit-transform: @arguments; /* Chrome, Opera 15+, Safari 3.1+ */
       -moz-transform: @arguments; /* Firefox 3.5+ */
        -ms-transform: @arguments; /* IE 9 */
         -o-transform: @arguments; /* Opera 10.5+ */
            transform: @arguments; /* Firefox 16+, IE 10+, Opera */
}

.translate(@x:0, @y:0) {
    .transform(translate(@x, @y));
}

并应用如下所示的内容:

And apply it something like the following:

#main {
   .translate(280px, 0);
}

但是在 IE8和Opera mini 中却不起作用.在这些浏览器中是否有一些后备,polyfill或其他支持它的东西?

But it's not wotk in IE8 and Opera mini. Is there some fallback, polyfill or any for supporting it in therese browsers?

推荐答案

您可以使用一些方法,modenizer建议的方法是:

There are a few you can use, the ones suggested from modenizer are:

css砂纸 transformie .

不过,我会争辩说,在像ie8这样的旧版浏览器中添加pollyfills会损害已经过去的浏览器的性能并降低用户体验.另外,如果您要向移动浏览器中添加pollyfills,则会增加3g连接中的加载时间,这可能会使用户不满意.

I'd argue though, that adding pollyfills to older browser like ie8 damages the performance of an already past it browser and lowers the user experience. Also, if you are adding pollyfills to mobile browsers you are adding to the loading times which in a 3g connection might put users off.

这篇关于IE8中是否有针对CSS转换属性的polyfill的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆