Created
December 17, 2015 02:30
-
-
Save anonymous/5063bda62501ab6b1b14 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/xonujewayu
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.radio label { | |
display: inline-block; | |
cursor: pointer; | |
position: relative; | |
padding-left: 5px; | |
margin-right: 5px; | |
font-size: 13px; | |
} | |
.radio input[type=radio] { | |
display: none; | |
} | |
.radio label:before { | |
content: ""; | |
display: inline-block; | |
width: 16px; | |
height: 16px; | |
margin-right: 1px; | |
position: absolute; | |
left: 0; | |
bottom: 1px; | |
background-color: #4a4; | |
box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8); | |
} | |
.radio label:before { | |
border-radius: 5px; | |
} | |
.radio input[type=radio]:checked + label:before { | |
content: "\2022"; | |
color: #f3f3f3; | |
font-size: 30px; | |
text-align: center; | |
line-height: 18px; | |
} | |
.radio input[value="49"] { | |
background-color: #a44; | |
} | |
.radio-toolbar input[type="radio"] { | |
display:none; | |
} | |
.radio-toolbar label { | |
display:inline-block; | |
background-color:#ddd; | |
padding:4px 11px; | |
font-family:Arial; | |
font-size:16px; | |
} | |
.radio-toolbar input[type="radio"]:checked + label { | |
background-color:#bbb; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="radio"> | |
<input id="time+0" type="radio" name="time" value="47"> | |
<label for="time+0">0</label> | |
<input id="time+1" type="radio" name="time" value="48"> | |
<label for="time+1">1</label> | |
<input id="time+2" type="radio" name="time" value="49"> | |
<label for="time+2">2</label> | |
<input id="time+3" type="radio" name="time" value="50"> | |
<label for="time+3">3</label> | |
</div> | |
<div class="radio-toolbar"> | |
<input id="time0" type="radio" name="time" value="47"> | |
<label for="time0">0</label> | |
<input id="time1" type="radio" name="time" value="48"> | |
<label for="time1">1</label> | |
<input id="time2" type="radio" name="time" value="49"> | |
<label for="time2">2</label> | |
<input id="time3" type="radio" name="time" value="50"> | |
<label for="time3">3</label> | |
</div> | |
<script id="jsbin-source-css" type="text/css">.radio label { | |
display: inline-block; | |
cursor: pointer; | |
position: relative; | |
padding-left: 5px; | |
margin-right: 5px; | |
font-size: 13px; | |
} | |
.radio input[type=radio] { | |
display: none; | |
} | |
.radio label:before { | |
content: ""; | |
display: inline-block; | |
width: 16px; | |
height: 16px; | |
margin-right: 1px; | |
position: absolute; | |
left: 0; | |
bottom: 1px; | |
background-color: #4a4; | |
box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8); | |
} | |
.radio label:before { | |
border-radius: 5px; | |
} | |
.radio input[type=radio]:checked + label:before { | |
content: "\2022"; | |
color: #f3f3f3; | |
font-size: 30px; | |
text-align: center; | |
line-height: 18px; | |
} | |
.radio input[value="49"] { | |
background-color: #a44; | |
} | |
.radio-toolbar input[type="radio"] { | |
display:none; | |
} | |
.radio-toolbar label { | |
display:inline-block; | |
background-color:#ddd; | |
padding:4px 11px; | |
font-family:Arial; | |
font-size:16px; | |
} | |
.radio-toolbar input[type="radio"]:checked + label { | |
background-color:#bbb; | |
}</script> | |
</body> | |
</html> |
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
.radio label { | |
display: inline-block; | |
cursor: pointer; | |
position: relative; | |
padding-left: 5px; | |
margin-right: 5px; | |
font-size: 13px; | |
} | |
.radio input[type=radio] { | |
display: none; | |
} | |
.radio label:before { | |
content: ""; | |
display: inline-block; | |
width: 16px; | |
height: 16px; | |
margin-right: 1px; | |
position: absolute; | |
left: 0; | |
bottom: 1px; | |
background-color: #4a4; | |
box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8); | |
} | |
.radio label:before { | |
border-radius: 5px; | |
} | |
.radio input[type=radio]:checked + label:before { | |
content: "\2022"; | |
color: #f3f3f3; | |
font-size: 30px; | |
text-align: center; | |
line-height: 18px; | |
} | |
.radio input[value="49"] { | |
background-color: #a44; | |
} | |
.radio-toolbar input[type="radio"] { | |
display:none; | |
} | |
.radio-toolbar label { | |
display:inline-block; | |
background-color:#ddd; | |
padding:4px 11px; | |
font-family:Arial; | |
font-size:16px; | |
} | |
.radio-toolbar input[type="radio"]:checked + label { | |
background-color:#bbb; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment