Created
October 23, 2017 19:07
-
-
Save alireza-saberi/0608f962c68a99e1a24f5067778cce13 to your computer and use it in GitHub Desktop.
replacing checkbox + radiobox
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
input[type="radio"] { | |
visibility: hidden; | |
position: relative; | |
} | |
input[type="radio"]:after{ | |
visibility: visible; | |
position: absolute; | |
content: ""; | |
top: 0; | |
left: 0; | |
background: url($sprite-sheet-path) 0 100% no-repeat; | |
width: 20px; | |
height: 20px; | |
cursor:pointer; | |
} | |
input[type="radio"]:checked:after{ | |
visibility: visible; | |
position: absolute; | |
content: ""; | |
top: 0; | |
left: 0; | |
background: url($sprite-sheet-path) 0 98.59254046446165% no-repeat; | |
} | |
input[type="checkbox"] { | |
visibility: hidden; | |
position: relative; | |
} | |
input[type="checkbox"]:after { | |
visibility: visible; | |
position: absolute; | |
content: ""; | |
top: 0; | |
left: 0; | |
background: url($sprite-sheet-path) 0 41.16819141449683% no-repeat; | |
width: 20px; | |
height: 20px; | |
cursor:pointer; | |
} | |
input[type="checkbox"]:checked:after { | |
visibility: visible; | |
position: absolute; | |
content: ""; | |
top: 0; | |
left: 0; | |
background: url($sprite-sheet-path) 0 39.76073187895848% no-repeat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment