HAL spolupracujeme

by Petr Haluza

HTML

<div class="container" style="height:500px">blahblah</div>
  <div class="container">
  <div class="card one">
    1
  </div>
  <div class="card two">
    2
  </div>
  <div class="card three">
    3
  </div>
  <div class="card four">
    4
  </div>
</div>
<div class="container" style="height:500px">blahblah</div>

CSS

* {
  padding: 0;
  margin: 0;
}
.container {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  gap: 24px;
  margin: 50px auto;
  height: 2040px;
  align-items: center;
}

.card {
  width: 80%;
  margin: 0 20px;
  box-sizing: border-box;
  background: #dedede;
  min-height: 400px;
  border-radius: 32px;
  position: sticky;
  
  display:flex;
  align-items: center;
  justify-content: center;
  font-family : 'system-ui', sans-serif;
  font-size: 90px;
  font-weight: medium;
  color: #FFF;
  font-family: 
}

.one {
  top: 50px;
  background: #6b04fd;
}
.two {
  top: 80px;
  background: #5a03d5;
}
.three {
  top: 110px;
  background: #4b05ad;
}

.four {
  top: 140px;
  background: #2c0076;
}