Skip to content

Instantly share code, notes, and snippets.

@PrathamKumar14
Last active April 21, 2022 10:18
Show Gist options
  • Save PrathamKumar14/4d0a50f728b8bb6f8f5b09965517329d to your computer and use it in GitHub Desktop.
Save PrathamKumar14/4d0a50f728b8bb6f8f5b09965517329d to your computer and use it in GitHub Desktop.
/* You need to take care of the compatibility */
/* For firefox ::-moz-range-thumb */
/* For IE ::-ms-thumb */
input[type="range"] {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-appearance: none;
width: 600px;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
height: 40px;
width: 30px;
border-radius: 10px;
background: #440a67;
cursor: pointer;
margin-top: -10px;
}
/* ::-moz-range-track for firefox */
/* For IE ::-ms-track */
input[type="range"]::-webkit-slider-runnable-track {
width: 100%;
height: 8.4px;
cursor: pointer;
background: #ff7171;
height: 20px;
border-radius: 10px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment