问题描述
pre> #box
{
width:400px;
height:400px;
display:inline-block;
position:absolute;
transform:rotate(0deg);
-webkit-transform:rotate(0deg);
-moz-transform:rotate(0deg);
-o-transform:rotate(0deg);
-ms-transform:rotate(0deg);
transition:all 0.8s 1s ease-in-out;
-webkit-transition:all 0.8s 1s ease-in-out;
-moz-transition:all 0.8s 1s ease-in-out;
-o-transition:all 0.8s 1s ease-in-out;
opacity:0;
}
#box.animate
{
transform:rotate(360deg);
-webkit-transform:rotate(360deg);
-moz-transform:rotate(360deg);
-o-transform:rotate(360deg);
-ms-transform:rotate(360deg);
opacity:100;
}
我看过以下两个类似的问题, t解决我的问题。
我愿意使用jQuery,但我不知道它足够自己编码。
更新
下面是一个新问题的链接,我问如何使用jQuery解决。如果你能帮助我,我会让你一个蛋糕。
IE9不支持转换,它不会使用转换样式进行动画处理。
您必须使用javascript或javascript库(jQuery等)才能实现在IE 9.所以回答你的初始问题,答案是否,它不应该在IE 9中工作。你可能想改写和发布一个新的问题,如何在jquery图像旋转。
I have a div that I'm rotating as it fades in. It works in every modern browser, but the code for IE doesn't seem to be working.
#box
{
width: 400px;
height: 400px;
display: inline-block;
position: absolute;
transform: rotate(0deg);
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transition: all 0.8s 1s ease-in-out;
-webkit-transition: all 0.8s 1s ease-in-out;
-moz-transition: all 0.8s 1s ease-in-out;
-o-transition: all 0.8s 1s ease-in-out;
opacity:0;
}
#box.animate
{
transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
opacity:100;
}
I've looked at the following two similar questions, but their solutions didn't solve my problem.
css3 rotation doesn't work in IE9
CSS3 transform: rotate; in IE9
I'd be willing to use jQuery, but I don't know it well enough to code it myself.
Update
Below is a link to a new question I asked about how to solve using jQuery. If you can help I'll make you a cake. Or a pie.
Rotating a div using jQuery that's supported by IE9
IE9 does not support transitions, therefore, it will not animate using the transition style.
http://caniuse.com/#search=transition
You will have to use javascript or a javascript library (jQuery, etc) in order to achieve this in IE 9. So to answer your initial question, the answer is no, it should not work in IE 9. You might want to rephrase and post a new question on how to do image rotation in jquery however.
这篇关于应该不是这个CSS在IE9工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!