<!doctype html> | |
<style> | |
* { | |
margin: 0; | |
} | |
html { | |
background: white; | |
width: 200px; | |
height: 200px; | |
position: relative; | |
z-index: -1; | |
} | |
.compDesc { | |
will-change: transform; | |
position: absolute; | |
top: 0; | |
left: 50px; | |
width: 50px; | |
height: 100px; | |
background: green; | |
z-index: -2; | |
} | |
.desc { | |
width: 50px; | |
height: 100px; | |
background: green; | |
} | |
</style> | |
<div class="compDesc"></div> | |
<div class="desc"></div> |