Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 20px; font: 18pt monospace; line-height: 30px; }
#scope { overflow: auto; contain: layout; padding: 20px;
width: 200px; height: 100px; border: 20px solid #acf; }
#part-hide { padding: 10px; visibility: hidden;
border: 4px solid orange; width: 150px; height: 180px;
margin: 20px 0 0 90px; }
#part { position: absolute; top: 66px; will-change: transform;
background: #fac; padding: 10px; border: 4px solid orange;
width: 150px; height: 180px; margin: 20px 0 0 90px; }
</style>
</head>
<body>
<div id=scope>World
<div id=part-hide></div>
</div>
<!-- TODO(crbug.com/468277656): The child currently pops out of the
scope's clip; this will be addressed by the nesting proposal in:
<div id=part>child</div>
<script>
scope.scrollBy(40, 24);
</script>
</body>
</html>