DEV Community

n350071πŸ‡―πŸ‡΅
n350071πŸ‡―πŸ‡΅

Posted on

CSS fix scroll

πŸ˜ƒ

<div class='sticky-top-content'>
  <div>
    something..
  </div>
<div>
Enter fullscreen mode Exit fullscreen mode
.sticky-top-content{
  position: sticky;
  top: 5rem;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)