For my sticky navbar, I utilized the Bootstrap 4 class sticky-top
. My preference is for a CSS-based solution rather than JavaScript due to past errors encountered with JS.
I aim to have my navbar change to a transparent color when it becomes sticky upon scrolling. However, this transition from a random color to transparency does not work as expected. The grey background from the sticky-top class seems to override the intended effect.
I have attempted adding a new class using JavaScript to address this issue but have not yet found a successful solution.