我有一个jQuery图像滚动器,使用perspective
和transform:translateZ
CSS属性模拟深度。在Chrome中可以正确呈现,但在IE10或Firefox中不能。
这是完整的项目(点击“Who's coming”菜单链接以查看图像滚动器):http://www.girlguiding.org.uk/test/biggig/index.html,以下是相关代码的jsFiddle:http://jsfiddle.net/moosefetcher/rxCMr/28/ (我不知道为什么,但stackoverflow告诉我需要包含代码才能链接到jsFiddle,因此这是CSS)...
.scroller {
position: relative;
perspective: 150;
-webkit-perspective: 150;
-ms-perspective: 150;
-moz-perspective: 150;
}
.artistBox {
width: 228px;
height: 268px;
background-color: #000000;
border-radius: 16px;
position: absolute;
overflow: hidden;
z-index: 4;
}
.artistBox p {
position: absolute;
font-family:"Arial", sans-serif;
color: white;
font-size: 22px;
}
.artistBoxFront {
z-index: 5;
}
.artistBoxNew {
z-index: 3;
opacity: 0;
}
.scrollerButton {
position: absolute;
top: 128px;
width: 32px;
height: 32px;
border: 2px solid white;
border-radius: 32px;
background-color: #F49D19;
box-shadow: 1px 1px 3px #555588;
z-index: 6;
}
.scrollerButtonOver {
background-color: #ffaa26;
box-shadow: 2px 2px 3px #555588;
}
注意,我已经尝试了包含和不包含
-ms-
前缀的属性。(当前的jsFiddle包括-webkit-
和-moz-
以及两者。)
有人知道为什么这在IE10中可能不起作用吗?
干杯。
px
)。 - Matt Coughlin