相关疑难解决方法(0)

使轮子在IE中旋转

我有以下代码用JS和CSS旋转轮子:

var prefix = (function() {
    if (document.body.style.MozTransform !== undefined) {
        return "MozTransform";
    }
    else if (document.body.style.WebkitTransform !== undefined) {
        return "WebkitTransform";
    }
    else if (document.body.style.OTransform !== undefined) {
        return "OTransform";
    }
    else {
        return "transform";
    }
}()),
    rotateElement = function(element, degrees) {
        var val = "rotate(-" + degrees + "deg)";
        element.style[prefix] = val;
        element.setAttribute("data-rotation", degrees);
    },
 spinModifier = function() {
      return Math.random() * 10 + 25;
 },
 modifier = spinModifier(),
 slowdownSpeed = 0.5,
spinWheelfn = function(amt) {
    clearTimeout(spinTimeout);
     modifier …
Run Code Online (Sandbox Code Playgroud)

javascript css internet-explorer rotation

5
推荐指数
1
解决办法
1966
查看次数

标签 统计

css ×1

internet-explorer ×1

javascript ×1

rotation ×1