html - CSS3 transform not working properly with Webkit? -
i'm trying rig demo found webkit should have 1 image on 1 side of frame , flip image. instead, webkit decides show me image on both sides, mirrored. appreciated much!
fiddle: http://jsfiddle.net/sh2jz/
css:
#f1_container { position: relative; margin: 10px auto; width: 450px; height: 281px; z-index: 1; } #f1_container { perspective: 1000; } #f1_card { width: 100%; height: 100%; transform-style: preserve-3d; transition: 1.0s linear; } #f1_container:hover #f1_card { transform: rotatey(180deg); -webkit-transform: rotatey(180deg); box-shadow: -5px 5px 5px #aaa; } .face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; } .face.back { display: block; transform: rotatey(180deg); -webkit-transform: rotatey(180deg); box-sizing: border-box; color: white; text-align: center; background-color: #aaa; }
html:
<div id="f1_container"> <div id="f1_card" class="shadow"> <div class="front face"> <img src="http://css3.bradshawenterprises.com/images/windows%20logo.jpg"/> </div> <div class="back face center"> <img src="http://blog.roblox.com/wp-content/uploads/2012/09/mac-os-x-10.5-leopard.png" height="281" width="450" /> </div> </div> </div>
you've missed -webkit-
version couple of transform
-related statements:
#f1_container { position: relative; margin: 10px auto; width: 450px; height: 281px; z-index: 1; } #f1_container { perspective: 1000; } #f1_card { width: 100%; height: 100%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: 1.0s linear; -webkit-transition: 1.0s linear; } #f1_container:hover #f1_card { transform: rotatey(180deg); -webkit-transform: rotatey(180deg); box-shadow: -5px 5px 5px #aaa; } .face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; } .face.back { display: block; transform: rotatey(180deg); -webkit-transform: rotatey(180deg); box-sizing: border-box; color: white; text-align: center; background-color: #aaa; }
Comments
Post a Comment