Created
December 30, 2020 08:52
-
-
Save Hansanghyeon/a6eb12e8201d2ab27c2a9afda9f80931 to your computer and use it in GitHub Desktop.
[ui] ios checkbox
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.iosCheckbox { | |
display: inline-block; | |
background: #fff; | |
padding: 10px 15px; | |
> input { | |
display: none; | |
} | |
i { | |
display: inline-block; | |
padding: 2px; | |
width: 40px; | |
height: 20px; | |
border-radius: 13px; | |
vertical-align: middle; | |
transition: 0.25s 0.09s; | |
position: relative; | |
background: #aaaaaa; | |
box-sizing: initial; | |
&:after { | |
content: " "; | |
display: block; | |
width: 20px; | |
height: 20px; | |
border-radius: 50%; | |
background: #fff; | |
position: absolute; | |
left: 2px; | |
transition: 0.25s; | |
} | |
} | |
> input:checked + i { | |
background: #47c17a; | |
} | |
> input:checked + i:after { | |
transform: translateX(20px); | |
} | |
&:hover { | |
cursor: pointer; | |
} | |
} |
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 class="iosCheckbox> | |
Bluetooth | |
<input type="checkbox" /> | |
<i></i> | |
</label> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment