Ho questo codice http://jsfiddle.net/C32Hx/4/z-index non mantenuta dopo css3 ruotare
<style>
body {margin-left:10px;}
#top {background:blue;width:30px;height:30px;
position:absolute; bottom:0; z-index:2;}
button {margin-top:200px}
#back {width:120px;height:100px;background:red; position:absolute}
#front {width:100px;height:100px;background:green;
position:absolute; margin-top:50px; z-index:0.8}
</style>
<div id="back"><div id="top"></div> back</div>
<div id="front">front</div>
<button onclick="rotate()">rotate</button>
<script>
function rotate()
{
document.getElementById("back").style.MozTransform = "rotate(10deg)";
document.getElementById("back").style.WebkitTransform = "rotate(10deg)";
document.getElementById("back").style.msTransform = "rotate(10deg)";
document.getElementById("back").style.transform="rotate(10deg)";
return false;
}
</script>
Dopo la rotazione, z-index non viene mantenuta sull'elemento #top.
Si prega di suggerire come risolvere questo problema.
Grazie.
Questo sembra essere un duplicato di http://stackoverflow.com/questions/6953497/webkit-transform-overwrites-z-index-ordering-in-chrome-13 –
Ho letto quel post. Dato che sono un novizio di css3, non riesco a correggere il codice. Potete per favore suggerire una soluzione per il mio problema. Grazie. – Arnold