Firefox中的3D转换似乎与z-index有关.在我看来,渲染是“忽略”3D Z位置,只是使用DOM的z-index.令人感兴趣的是,当可见部分变得较小时,使得只有一部分轮可见,则z指数突然正确,尽管其他工件开始出现.
这个交叉口bug演示自2011年以来在Firefox中被发现,但是我的圈子并不相交 – 所以我希望它在某种程度上是可能的.
http://jsfiddle.net/yNfQX/21/
Firefox Bugtracker:https://bugzilla.mozilla.org/show_bug.cgi?id=689498
.perspective { width: 400px; height: 400px; position: relative; perspective: 3000px; display: block; } .dcw { width: 100%; height: 100%; position: absolute; transform-style: preserve-3d; } .dc { top: calc(50% - 44px); left: calc(50% - 44px); margin: auto; border-radius: 50%; position: absolute; cursor: pointer; transform-style: preserve-3d; width: 88px; height: 88px; border: 1px solid black; }
<div class="perspective"> <div class="dcw"> <div class="dc" style="background-color: rgba(255,1);transform: rotateZ( 0deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(251,4,1);transform: rotateZ( 10deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(248,7,1);transform: rotateZ( 20deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(244,11,1);transform: rotateZ( 30deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(241,14,1);transform: rotateZ( 40deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(237,18,1);transform: rotateZ( 50deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(234,21,1);transform: rotateZ( 60deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(230,25,1);transform: rotateZ( 70deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(227,28,1);transform: rotateZ( 80deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(223,32,1);transform: rotateZ( 90deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(219,36,1);transform: rotateZ( 100deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(216,39,1);transform: rotateZ( 110deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(212,43,1);transform: rotateZ( 120deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(209,46,1);transform: rotateZ( 130deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(205,50,1);transform: rotateZ( 140deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(202,53,1);transform: rotateZ( 150deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(198,57,1);transform: rotateZ( 160deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(195,60,1);transform: rotateZ( 170deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(191,64,1);transform: rotateZ( 180deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(187,68,1);transform: rotateZ( 190deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(184,71,1);transform: rotateZ( 200deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(180,75,1);transform: rotateZ( 210deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(177,78,1);transform: rotateZ( 220deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(173,82,1);transform: rotateZ( 230deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(170,85,1);transform: rotateZ( 240deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(166,89,1);transform: rotateZ( 250deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(163,92,1);transform: rotateZ( 260deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(159,96,1);transform: rotateZ( 270deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(155,100,1);transform: rotateZ( 280deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(152,103,1);transform: rotateZ( 290deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(148,107,1);transform: rotateZ( 300deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(145,110,1);transform: rotateZ( 310deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(141,114,1);transform: rotateZ( 320deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(138,117,1);transform: rotateZ( 330deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(134,121,1);transform: rotateZ( 340deg ) translateX(125px) rotateX( -60deg ); "></div> <div class="dc" style="background-color: rgba(131,124,1);transform: rotateZ( 350deg ) translateX(125px) rotateX( -60deg ); "></div> </div> </div>
JSFiddle:
https://jsfiddle.net/gvquf0g6/
z-index问题(Firefox的屏幕截图):
人工制品问题,以及使用部分可见轮廓的z-index(Firefox的截图):
将鼠标移动到工件上(缺少的块)会在首次渲染时将它们按原样填满.