is now part of Shuffle™. The new editor includes templates for Bootstrap, Bulma, Material-UI, and Tailwind CSS.
Switch to Shuffle →

Bootstrap class: .sticky-top

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

Preview

Sticky top

Tips 💡

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