<style>
.box {
width:200px;
top: 20px;
position: sticky;
}
</style>
<div class="container">
<div class="box">
<p>I am a sticky position box. I will display in my static position, but when the document scrolls and I reach 20 pixels from the top of the viewport, I become stuck to that location.</p>
</div>
<p>One of the first questions the visitor to an aerodrome, when watching the altitude tests, asks is: "How is it known that the airman has risen to a height of so many feet?" Does he guess at the distance he is above the earth?</p>
<p>If this were so, then it is very evident that there would be great difficulty in awarding a prize to a number of competitors each trying to ascend higher than his rivals.</p>
</div>