-ms-perspective无法在Internet Explorer 10中工作

时间:2013-04-04 13:10:16

标签: jquery css3 firefox internet-explorer-10 perspective

我正在尝试使用'perspective:'和'transform:translateZ'css属性来定位具有深度的div。我在Chrome中使用它,但在IE10或Firefox20中没有。 您可以在“Who is come coming”菜单页面上看到测试here ...

包含div的css类为.scroller:

.scroller {  
    position: relative;  
    perspective: 150;  
    -webkit-perspective: 150;  
    -ms-perspective: 150;  
    -moz-perspective: 150;  
}  

而且,对于内部div,使用jQuery设置translateZ:

$(this).css('transform', 'translateZ(-' + ((1-$(this).css('opacity')) * 80) + 'px)');                           
$(this).css('-webkit-transform', 'translateZ(-' + ((1-$(this).css('opacity')) * 80) + 'px)');  
$(this).css('-ms-transform', 'translateZ(-' + ((1-$(this).css('opacity')) * 80) + 'px)');  
$(this).css('-moz-transform', 'translateZ(-' + ((1-$(this).css('opacity')) * 80) + 'px)');  

但是,它不适用于IE10或Firefox20。有没有我错过的东西?

1 个答案:

答案 0 :(得分:2)

  

“请勿在透视图之前使用Microsoft供应商前缀(”-ms-“)   属性。在Internet Explorer 10和Internet中支持前缀   之后。“ - MSDN.