<!DOCTYPE html> 
<html lang="en"> 
<head> <meta charset="UTF-8"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>Sticky</title> 
</head> 
<body> 

<div class="container"> 
<div class="pos">One</div> 
<div class="pos">Two</div> 
<div class="pos" id="three">Three</div> <div class="pos">Four</div> 
</div> 

</body> 
</html> 
.container{ 
 height:1500px; 
 border:2px solid black;
} 

.pos{border:1px solid black;
display:inline-block;
height:70px; 
width:70px;
text-align:center;
border-radius:7px;
}

#three{ 
position:sticky;
top:10px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.