css - Element with lower zindex and rotation applied ignores higher zindexes in Google Chrome -


i trying create box can hover , additionally need rotate image behind hover hitbox. seems in google chrome 1 part of image in front of hitbox , other 1 behind despite fact hitbox z-index:2 , image z-index: 1.

here demo.

css:

.hitbox {     position: absolute;     top: 0;     left: 0;     height: 100%;     width: 100%;     z-index: 2;     background-color: rgba(255,50,0,0.3); } img.img-ele {     position: absolute;     top: 0;     left: 0;     z-index: 1;     -webkit-transform: rotatex(15deg) rotatey(12deg);     -moz-transform: rotatex(15deg) rotatey(12deg);     -ms-transform: rotatex(15deg) rotatey(12deg);     -o-transform: rotatex(15deg) rotatey(12deg);     transform: rotatex(15deg) rotatey(12deg); } 

html:

<div class="container">     <div class="box">         <div class="hitbox"></div>         <img src="http://placehold.it/111x89/000" class="img-ele" />     </div> </div> <div class="inside-container">inside container</div> <div class="inside-hitbox">inside hitbox</div> 

is there workaround or different html markup should try?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -