Bootstrap class: .sticky-top

Do not have time to learn all the Bootstrap classes?

Try drag & drop Bootstrap builder

<div class="sticky-top bg-primary">Sticky top</div>

Preview

Sticky top

Sass source

/* _position.scss:31 */
.sticky-top {
  @supports (position: sticky) {
    position: sticky;
    top: 0;
    z-index: $zindex-sticky;
  }
}

Uses variables

Code copied to the clipboard.

Copying failed

/* _position.scss:31 */
$zindex-sticky

More in Bootstrap Positioning