Implement StickyState CSS
masterTo ensure the polyfill and state classes work correctly, your CSS must include definitions for the base sticky class and the fallback fixed positioning. The is-sticky class is used to trigger the sticky state styles. If you customize className, stateClassName, fixedClass, or absoluteClass in the JavaScript options, ensure your CSS selectors match those values.
.sticky {
position: -webkit-sticky;
position: sticky;
}
.sticky.sticky-fixed.is-sticky {
position: fixed;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.sticky.sticky-fixed.is-sticky:not([style*="margin-top"]) {
margin-top: 0 !important;
}
.sticky.sticky-fixed.is-sticky:not([style*="margin-bottom"]) {
margin-bottom: 0 !important;
}
.sticky.sticky-fixed.is-absolute{
position: absolute;
}