gpt4 book ai didi

jquery - -ms-perspective 不适用于 Internet Explorer 10

转载 作者:太空宇宙 更新时间:2023-11-04 04:39:06 26 4
gpt4 key购买 nike

我正在尝试使用“perspective:”和“transform: translateZ”css 属性来定位具有深度的 div。我让它在 Chrome 中工作,但在 IE10 或 Firefox20 中不工作。可以看测试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 中不起作用。我错过了什么吗?

最佳答案

"Do not use the Microsoft vendor prefix ("-ms-") before the perspective property. It is supported unprefixed in Internet Explorer 10 and later." - MSDN.

关于jquery - -ms-perspective 不适用于 Internet Explorer 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15812204/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com