blob: 3e64c2fa44de7248991b369227b27bbdf1b911b4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
margin: 20px;
}
.box {
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
background-color: silver;
}
.composited {
transform: translateZ(1px);
}
.sibling {
top: 300px;
background-color: gray;
}
.negative {
z-index: -1;
background-color: red;
}
.positive {
z-index: 1;
background-color: green;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
setTimeout(() => {
document.getElementById('target').classList.add('composited');
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}, false);
</script>
</head>
<body>
<div class="container">
<div class="composited child box">
<div class="negative box">&nbsp;</div>
<div class="composited positive box">&nbsp;</div>
</div>
<div id="target" class="sibling box">&nbsp;</div>
</div>
</body>
</html>