【问题标题】:IE10 transition not working properlyIE10 过渡无法正常工作
【发布时间】:2016-02-05 18:25:23
【问题描述】:

我正在创建一个滑块,它将向左/向右移动框。它在 Chrome 和 FireFox 上完美运行。但是在IE10上,向左移动后是这样的:

看起来移动很紧张。右边框有多个轻微的副本(不知道如何描述。)。

我的 SASS 是这样的:

@include transition-timing-function(cubic-bezier(0.1, 0.57, 0.1, 1))
@include transition-duration(500ms)

点击左/右按钮后,进行移动的 JavaScript 是:

$scroller.css({
    'transform': "translate(-" + scrollLeftPosition + "px, 0px) translateZ(0px)"
 });

咨询MDN,好像IE10支持transform这个属性。如何解决?谢谢。

【问题讨论】:

    标签: css internet-explorer css-transitions transform


    【解决方案1】:

    似乎问题在于 IE 页面渲染。通过在动画后稍微改变宽度来临时解决问题(以便浏览器重新渲染视图):

    $slider.width(viewWidth + 1);
    $timeout(function () {
        $slider.width(viewWidth);
    }, 600);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-11-29
      • 1970-01-01
      • 2020-10-29
      • 1970-01-01
      • 2020-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多