I have implemented the input type range property on my webpage and have applied some CSS styling to it. However, I feel like there is room for improvement.
.Slider {
-webkit-appearance: none;
width: 75%;
height: 15px;
border-radius: 5px;
background: #d3d3d3;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
}
.Slider:hover {
opacity: 1;
}
.Slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 25px;
height: 25px;
background: #4BD1A0;
cursor: pointer;
}
.Slider::-moz-range-thumb {
width: 25px;
height: 25px;
background: #4BD1A0;
cursor: pointer;
}
<div class="Slidecontainer" id="Slider"> <span id="Amount"> Amount</span>
<input type="range" min="5000" max="10000" step="1000" value="5000" class="Slider" id="myRange">
<p>Value: <span id="demo"></span></p>
</div>
I am looking to display the input value dynamically on the slider handle as I move it. Is this possible? If so, how can I achieve this functionality?
Thanks for your assistance!