<div class="wrapper">
  <div class="card">
    <h2><span>Project #1</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
  <div class="card">
    <h2><span>Project #2</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
  <div class="card">
    <h2><span>Project #3</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
  <div class="card">
    <h2><span>Project #4</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
  <div class="card">
    <h2><span>Project #5</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
  <div class="card">
    <h2><span>Project #6</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
  <div class="card">
    <h2><span>Project #7</span>Title of the Project</h2>
    <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Harum, perspiciatis blanditiis accusamus commodi consectetur id tempora rem iure eligendi quos eos et autem ratione exercitationem earum laborum ad a sequi!</p>
  </div>
</div>
html,
body {
  margin: 0;
}

body {
  background: linear-gradient(#e8e8e8, #e0e0e0);
}

.wrapper {
  margin-top: 100px;
  padding-top: 150px;
  padding-bottom: 1000px;
  max-width: 700px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.card {
  top: 30px;
  position: sticky;
  border: 1px solid #ccc;
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
  background-color: white;
  color: #333;
  padding: 40px;
  border-radius: 10px;
  margin-bottom: 20px;

  h2 {
    padding: 0;
  }
  span {
    display: block;
    font-size: 14px;
    color: #0c4eb9;
  }
}

@for $i from 1 through 8 {
  .card:nth-child(#{$i}n) {
    top: $i * 20px;
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.