这是为什么:
$("#bottom").css({"transform":"rotateX ("+rotation[0][0] + "deg)"});
不起作用?
rotation[0][0] 已定义,我可以更改任何其他属性(例如背景颜色),那么如何使用 Jquery 沿 X 轴旋转元素? 我正在使用 chrome,但我也尝试过 -webkit-transform。
最佳答案
这是因为 rotateX
和第一个左括号之间有一个空格。
更改“rotateX(”
:
$("#bottom").css({"transform":"rotateX ("+rotation[0][0] + "deg)"});
至“rotateX(”
:
$("#bottom").css({"transform":"rotateX("+rotation[0][0] + "deg)"});
关于Jquery .css() 方法不适用于 css 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19771418/