1.slidecontainer {
2 width: 100%; /* Width of the outside container */
3}
4
5/* The slider itself */
6.slider {
7 -webkit-appearance: none; /* Override default CSS styles */
8 appearance: none;
9 width: 100%; /* Full-width */
10 height: 25px; /* Specified height */
11 background: #d3d3d3; /* Grey background */
12 outline: none; /* Remove outline */
13 opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
14 -webkit-transition: .2s; /* 0.2 seconds transition on hover */
15 transition: opacity .2s;
16}
17
18/* Mouse-over effects */
19.slider:hover {
20 opacity: 1; /* Fully shown on mouse-over */
21}
22
23/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
24.slider::-webkit-slider-thumb {
25 -webkit-appearance: none; /* Override default look */
26 appearance: none;
27 width: 25px; /* Set a specific slider handle width */
28 height: 25px; /* Slider handle height */
29 background: #04AA6D; /* Green background */
30 cursor: pointer; /* Cursor on hover */
31}
32
33.slider::-moz-range-thumb {
34 width: 25px; /* Set a specific slider handle width */
35 height: 25px; /* Slider handle height */
36 background: #04AA6D; /* Green background */
37 cursor: pointer; /* Cursor on hover */
38}
39
40/* Make sure to add JavaScript for functionality! */