Last active
November 22, 2019 10:26
-
-
Save bmbrands/08cfd22e530890969b16a5313ee9c557 to your computer and use it in GitHub Desktop.
custom-css-sliders-cdtop.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cd-top { | |
display: inline-block; | |
height: 40px; | |
width: 40px; | |
position: fixed; | |
bottom: 40px; | |
right: 10px; | |
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); | |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); | |
/* image replacement properties */ | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; | |
background: rgba(65, 182, 230, 0.8) url(https://cambridge-community.org.uk/ola/images/cd-top-arrow.svg) no-repeat center 50%; | |
visibility: hidden; | |
opacity: 0; | |
-webkit-transition: opacity 0.3s 0s, visibility 0s 0.3s, background-color 0.3s 0s; | |
transition: opacity 0.3s 0s, visibility 0s 0.3s, background-color 0.3s 0s; } | |
.cd-top.cd-top--show, .cd-top.cd-top--fade-out, .cd-top:hover { | |
-webkit-transition: opacity 0.3s 0s, visibility 0s 0s, background-color 0.3s 0s; | |
transition: opacity 0.3s 0s, visibility 0s 0s, background-color 0.3s 0s; } | |
.cd-top.cd-top--show { | |
/* the button becomes visible */ | |
visibility: visible; | |
opacity: 1; } | |
.cd-top.cd-top--fade-out { | |
/* if the user keeps scrolling down, the button is out of focus and becomes less visible */ | |
opacity: 0.5; } | |
.cd-top:hover { | |
background-color: #41b6e6; | |
opacity: 1; } | |
@media only screen and (min-width: 768px) { | |
.cd-top { | |
right: 20px; | |
bottom: 20px; } } | |
@media only screen and (min-width: 1024px) { | |
.cd-top { | |
height: 60px; | |
width: 60px; | |
right: 30px; | |
bottom: 30px; } } | |
.slider-item .slider-label { | |
margin-bottom: 2rem; } | |
@media (min-width: 800px) { | |
.slider-item { | |
display: flex; | |
align-items: center; | |
margin-bottom: 0.5rem; } | |
.slider-item .slider-range { | |
flex: 0 0 220px; | |
max-width: 220px; | |
margin-right: 1rem; } | |
.slider-item .slider-label { | |
flex: 1 1 auto; | |
margin-bottom: 0; } } | |
input[type=range] { | |
-webkit-appearance: none; | |
width: 100%; | |
margin: 0px 0; | |
overflow: hidden; | |
height: 60px; | |
box-sizing: content-box; } | |
input[type=range]:focus { | |
outline: none; } | |
input[type=range]::-webkit-slider-runnable-track { | |
width: 100%; | |
height: 60px; | |
cursor: pointer; | |
box-shadow: 0; | |
background: red; | |
border-radius: 0px; | |
border: 0; } | |
input[type=range]::-webkit-slider-thumb { | |
box-shadow: 0; | |
border: 1px solid rgba(0, 0, 0, 0); | |
height: 60px; | |
width: 10px; | |
border-radius: 0px; | |
background: #434343; | |
cursor: pointer; | |
-webkit-appearance: none; | |
margin-top: -0.2px; | |
box-shadow: -200px 0 0 200px #0f0; } | |
input[type=range]:focus::-webkit-slider-runnable-track { | |
background: red; } | |
@-moz-document url-prefix() { | |
input[type=range] { | |
height: 60px; } } | |
input[type=range]::-moz-range-track { | |
width: 100%; | |
height: 60px; | |
cursor: pointer; | |
box-shadow: 0; | |
background: red; | |
border-radius: 0px; | |
border: 0; } | |
input[type=range]::-moz-range-thumb { | |
box-shadow: 0; | |
border: 1px solid rgba(0, 0, 0, 0); | |
height: 60px; | |
width: 10px; | |
border-radius: 0px; | |
background: #434343; | |
cursor: pointer; | |
box-shadow: -200px 0 0 200px #0f0; } | |
input[type=range]::-ms-track { | |
width: 100%; | |
height: 60px; | |
cursor: pointer; | |
background: transparent; | |
border-color: transparent; | |
color: transparent; } | |
input[type=range]::-ms-fill-lower { | |
background: #0f0; | |
border: 0; | |
border-radius: 0px; | |
box-shadow: 0; } | |
input[type=range]::-ms-fill-upper { | |
background: red; | |
border: 0; | |
border-radius: 0px; | |
box-shadow: 0; } | |
input[type=range]::-ms-thumb { | |
box-shadow: 0; | |
border: 1px solid rgba(0, 0, 0, 0); | |
width: 10px; | |
border-radius: 0px; | |
background: #434343; | |
cursor: pointer; | |
height: 60px; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment