#slider1 {
-webkit-appearance: slider-vertical; /* This makes ... */
background-color: black;
width: 1px;
height: 100px;
}
#slider2 {
-webkit-appearance: none; /* the difference. */
background-color: black;
width: 100px;
height: 1px;
}
#slider1::-webkit-slider-thumb,
#slider2::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 25px;
height: 25px;
background: #04aa6d;
cursor: pointer;
}
#slider1::-webkit-slider-thumb:hover,
#slider2::-webkit-slider-thumb:hover {
width: 20px;
height: 20px;
}
<input type="range" id="slider1" />
<input type="range" id="slider2" />
As seen here, the CSS styling was almost same for both sliders, except for the -webkit-appearance
property. But the horizontal slider (which is the default slider) accepts the styling while the vertical slider rejects it. I am on Chrome. How to make it work? Thanks!