Slider style
Drag the preview slider to feel the thumb size.
Preview and CSS
55
Style the native range input: track height, thumb size and colors for both. Drag the live slider to test it, then copy the webkit and Firefox CSS.
Drag the preview slider to feel the thumb size.
Range inputs have no native fill-before-thumb styling, so the trick is a linear-gradient background that is fill-colored up to the current percentage and track-colored after. JavaScript updates the percentage on every input event, which is why the fill follows the thumb live.
Webkit browsers need ::-webkit-slider-thumb with -webkit-appearance: none to kill the native look, plus a negative margin to center the thumb on the track. Firefox uses ::-moz-range-thumb and centers automatically. This tool emits both.