<div class="range-container"> <label for="range">Volume Control</label> <input type="range" id="range" min="0" max="100" value="50" class="custom-range"> </div>
.range-container {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
max-width: 300px;
padding: 20px;
}
label {
display: block;
margin-bottom: 15px;
font-weight: 600;
color: #374151;
}
.custom-range {
-webkit-appearance: none;
width: 100%;
height: 8px;
background: #e5e7eb;
border-radius: 5px;
outline: none;
cursor: pointer;
}
/* Slider Thumb (Chrome/Safari) */
.custom-range::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #3b82f6;
cursor: pointer;
box-shadow: 0 0 0 3px #fff, 0 0 0 6px #dbeafe;
transition: background .15s ease-in-out;
}
/* Slider Thumb (Firefox) */
.custom-range::-moz-range-thumb {
width: 20px;
height: 20px;
border: none;
border-radius: 50%;
background: #3b82f6;
cursor: pointer;
box-shadow: 0 0 0 3px #fff, 0 0 0 6px #dbeafe;
}
.custom-range::-webkit-slider-thumb:hover {
background: #2563eb;
}Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.