Created
September 9, 2017 17:04
-
-
Save gunaevart/2dfe31a5f39d1247493ec49b15c2a4da to your computer and use it in GitHub Desktop.
Стилизация чекбокса на CSS3
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
<label><input type="checkbox"><i></i></input></label> | |
body{ | |
text-align:center; | |
} | |
input{ | |
display: none; | |
} | |
i{ | |
display: inline-block; | |
width: 100px; | |
height: 100px; | |
border:1px solid #ccc; | |
position: relative; | |
} | |
i:before{ | |
content:''; | |
position: absolute; | |
top:10px; | |
right:10px; | |
bottom:10px; | |
left:10px; | |
background:red; | |
transform:scale(0); | |
transition:.4s; | |
} | |
input:checked+i:before{ | |
transform:scale(1); | |
transition:.4s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment