CSS转换:用于Internet Explorer的rotateX

时间:2022-05-18 17:07:15

I'm making a website (Parallax web page) that has parallax elements in it. Right now the parallax part seems to work fine in Firefox and Chrome, but not in IE.
There is the 'js/forest_unfixed.js' that applies calculations on the not working id="cont-3d" div. I'm trying to do

我正在制作一个有视差元素的网站(Parallax网页)。现在,视差部分似乎在Firefox和Chrome中运行良好,但在IE中则不行。有'js / forest_unfixed.js'对不工作的id =“cont-3d”div应用计算。我正在尝试做

cont3d.style["-ms-transform"] = "rotateX("+(90+(dyn_ratio)*(yPos/maxy))+"deg)";
cont3d.style.transform = "rotateX("+(90+(dyn_ratio)*(yPos/maxy))+"deg)";

I also tried using Modernizr, but it's the very same result. What am I doing wrong?

我也尝试过使用Modernizr,但结果却是一样的。我究竟做错了什么?

1 个解决方案

#1


1  

The problem there could be that IE doesn't play nice with nested 3d elements. Take a look at this answer:

问题可能是IE与嵌套的3d元素不兼容。看看这个答案:

CSS3 3D Transform doesn't work on IE11

CSS3 3D Transform在IE11上不起作用

#1


1  

The problem there could be that IE doesn't play nice with nested 3d elements. Take a look at this answer:

问题可能是IE与嵌套的3d元素不兼容。看看这个答案:

CSS3 3D Transform doesn't work on IE11

CSS3 3D Transform在IE11上不起作用