Skip to content

Instantly share code, notes, and snippets.

@shotaK
Last active January 12, 2018 12:14
Show Gist options
  • Save shotaK/50efb8c34ff22a0196995490411a88dd to your computer and use it in GitHub Desktop.
Save shotaK/50efb8c34ff22a0196995490411a88dd to your computer and use it in GitHub Desktop.
Checkbox Styling
.remember-me__title {
float: left;
}
.remember-me input {
visibility: hidden;
opacity: 0;
float: left;
position: absolute;
}
.remember-me input:checked + span {
background: #ffed00 url("../../assets/images/ic_check_small.png") no-repeat center center;
}
.remember-me__checkbox {
float: left;
width: 24px;
height: 24px;
background: #ffed00;
}
<label class="remember-me">
<span>
<input type="checkbox">
<span class="remember-me__checkbox"></span>
</span>
<span class="remember-me__title">REMEMBER ME</span>
</label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment