claudius ,
@claudius@darmstadt.social avatar

position: sticky; top: 0;

O_O

I use this on a headline that scrolls normally, until it would leave the viewport at the top. It will just "stick" to it while the rest of the page continues scrolling.

I used to do stuff like this all the time, but it used to involve at least some amount of JavaScript to switch between static and fixed at the right moment. Now it works just like that :-)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines