JSFiddle - React, Tailwind, and code Playground

by Peter Hozák

HTML

<h1 class='sticky'>
 sticky header
</h1>

static text before

<ul style="border: 0px; padding: 0px; margin: 0.5em 0px 0.5em 0.125em; list-style: none; user-select: none; background-color: rgb(0, 43, 54);"><li style="position: relative; padding-top: 0.25em; margin-left: 0px; padding-left: 0px;"><div style="display: inline-block; padding-right: 0.5em; padding-left: 0px; cursor: pointer;"><div style="margin-left: 0px; transition: 150ms; transform: rotateZ(90deg); transform-origin: 45% 50% 0px; position: relative; line-height: 1.1em; font-size: 0.75em; color: rgb(38, 139, 210);"><!-- react-text: 232 -->▶<!-- /react-text --></div></div><label style="display: inline-block; color: rgb(38, 139, 210); margin: 0px; padding: 0px; user-select: inherit; cursor: pointer;"><span><!-- react-text: 235 -->root<!-- /react-text --><!-- react-text: 236 -->:<!-- /react-text --></span></label><span style="padding-left: 0.5em; cursor: default; color: rgb(101, 123, 131);"><span><span style="margin-left: 0.3em; margin-right: 0.3em;">{}</span><!-- react-text: 240 --> <!-- /react-text --><!-- react-text: 241 -->1 key<!-- /react-text --></span></span><ul style="padding: 0px; margin: 0px; list-style: none; display: block;"><li style="position: relative; padding-top: 0.25em; margin-left: 0.875em; padding-left: 0px;"><div style="display: inline-block; padding-right: 0.5em; padding-left: 0px; cursor: pointer;"><div style="margin-left: 0px; transition: 150ms; transform: rotateZ(0deg); transform-origin: 45% 50% 0px; position: relative; line-height: 1.1em; font-size: 0.75em; color: rgb(38, 139, 210);"><!-- react-text: 246 -->▶<!-- /react-text --></div></div><label style="display: inline-block; color: rgb(38, 139, 210); margin: 0px; padding: 0px; user-select: inherit; cursor: pointer;"><span><!-- react-text: 249 -->a<!-- /react-text --><!-- react-text: 250 -->:<!-- /react-text --></span></label><span style="padding-left: 0.5em; cursor: default; color: rgb(133, 153, 0);"><span><span...

CSS

body {
  height: 200vh;
}

.sticky {
  background: yellow;
  position: sticky;
  top: 0;
}