<!DOCTYPE html> | |
<style> | |
.fixed { | |
position: fixed; | |
background-color: #aef; | |
width: 100px; | |
height: 100px; | |
top: 100px; | |
} | |
</style> | |
<div style="height: 1000px"></div> | |
<div class="fixed" style="left: 200px"></div> | |
<div class="fixed" style="left: 400px; will-change: transform"></div> | |
<script> | |
scrollBy(0, 120); | |
</script> |