<!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;
}
</style>
</head>
<body>
<div id="container">
<div class="scroll-content">
<div class="composited"></div>
<div class="inner"></div>
</div>
</div>
</body>
</html>