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)