<!DOCTYPE html> | |
<style> | |
.scroller { | |
width: 300px; | |
height: 200px; | |
border: 1px solid black; | |
} | |
.sticky { | |
position: absolute;; | |
left: 0; | |
top: 25px; | |
width: 100px; | |
height: 100px; | |
background: green; | |
} | |
</style> | |
This tests position:sticky in non-composited (left) and composited (right) overflow clip. | |
<div class="scroller" style="position:absolute; left:50px; top:50px;"> | |
<div class="sticky"></div> | |
</div> | |
<div class="scroller" style="position:absolute; left:450px; top:50px;"> | |
<div class="sticky"></div> | |
</div> |