blob: 3e351b940f93fe25e3a81d9cd1e87f5abe90ca99 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#container {
width: 200px;
height: 200px;
overflow: hidden;
border: 1px solid black;
}
.scroll-content {
height: 600px;
}
.inner {
position: relative;
width: 150px;
height: 150px;
margin-top: -10px; /* force overlap with the composited element */
margin-left: 10px;
box-sizing: border-box;
border: 40px solid black;
}
.composited {
height: 50px;
width: 100px;
-webkit-transform: translateZ(0);
}
</style>
</head>
<body>
<div id="container">
<div class="scroll-content">
<div class="composited"></div>
<div class="inner"></div>
</div>
</div>
</body>
</html>