JSFiddle - React, Tailwind, and code Playground
by Pavan Kumar
HTML
<div class="progress">
<div class="bar"></div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br><br>
<br>
<br><br>
CSS
.progress {
position: fixed;
top: 0;
left: 0;
width: 100%;
}
.bar {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 3px;
background-color: #7fdbff;
}
JavaScript
$(document).on('scroll', function() {
alert("hii")
})