<style> | |
#scroller { | |
outline: 5px solid rgba(0, 255, 0, 0.5); | |
outline-offset: -4px; | |
overflow: scroll; | |
width: 200px; | |
height: 200px; | |
box-sizing: border-box; | |
will-change: transform; | |
} | |
.spacer { | |
height: 300px; | |
} | |
</style> | |
<!-- #scroller outline should not be covered up by scrolling content background. | |
It is achieved by painting the outline into the decoration layer which draws | |
on top of all other layers. --> | |
<div id="scroller"> | |
<div class="spacer"></div> | |
</div> | |