Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save avil13/1dcb367cb4662467aab4191a554c726e to your computer and use it in GitHub Desktop.
Save avil13/1dcb367cb4662467aab4191a554c726e to your computer and use it in GitHub Desktop.
checkbox
<label class="checkbox">
<input class="checkbox_input" type="checkbox" name="checkbox" value="1">
<span class="checkbox_input-emu"></span>
<span class="checkbox_label-emu">Описание чекбокса</span>
</label>
<style>
.checkbox {
display: block;
position: relative;
padding: 0 0 0 30px;
margin-bottom: 15px;
}
.checkbox_input { display: none;}
.checkbox_input-emu {
position: absolute;
top: 0;
left: 0;
display: block;
width: 20px;
height: 20px;
border:2px solid currentColor;
background: rgba(0, 0, 0, 0);
cursor: pointer;
color: #40E0D0;
}
.checkbox_input-emu:after {
display: block;
opacity: 0;
width: 20px;
height: 20px;
content: "\2714";
color: currentColor;
font-size: 20px;
line-height: 20px;
text-align: center;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
.checkbox_input:checked + .checkbox_input-emu:after { opacity: 1;}
.checkbox_label-emu { display: inline-block;}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment