<h1>CSS Position: Fixed</h1>
<div class="container">
  <div class="box">static</div>
  <div class="box fixed">fixed</div>
  <div class="box">static</div>
</div>
body {
  height: 120vh;
}
div.container {
  display: flex;
  border: 1px dashed red;
}
div.box {
    height: 100px;
    width: 100px;
    border: 2px solid lightskyblue;
    text-align: center;
    background-color: lightgoldenrodyellow;
    border-radius: 10px;
    margin: 5px;
}

div.fixed {
    position: fixed;
    background-color: lightblue;
/*     top: 50px;
    left: 70px; */
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.