Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<style>
#scope {
position: relative; width: 200px; height: 100px;
background: white; contain: strict;
}
#nonpart1 {
position: absolute; top: 40px; left: 20px;
width: 50px; height: 50px; background: #a4f;
}
#nonpart2 {
position: absolute; top: 20px; left: 30px;
width: 50px; height: 50px; background: #f88;
}
#vt {
position: relative; width: 200px; height: 100px;
top: -100px; background: rgba(0, 0, 0, 0.1);
will-change: transform;
}
#part {
position: absolute; top: 30px; left: 50px;
width: 50px; height: 50px; background: #8cf;
}
</style>
<div id=scope>
<div id=nonpart1></div>
<div id=nonpart2></div>
</div>
<div id=vt>
<div id=part></div>
</div>