trigger check list

by Dru Dro

HTML

<form>
    <input type="checkbox" id="tick" class="tick"></input>
    <label for="tick"><span></span>Some option</label>
    <input type="checkbox" id="tick1" class="tick"></input>
    <label for="tick1"><span></span>Some option</label>
    <input type="checkbox" id="tick2" class="tick"></input>
    <label for="tick2"><span></span>Some option</label>
    <input type="checkbox" id="tick3" class="tick"></input>
    <label for="tick3"><span></span>Some option</label>
    <input type="checkbox" id="tick4" class="tick"></input>
    <label for="tick4"><span></span>Some option</label>
</form>

CSS

* {
    margin:0;
    padding: 0;
    font: 16pt Arial, sans-serif;
}
body {
    background: #454545;
}
.tick {
    display: none;
}
.tick + label span {
    display: inline-block;
    width: 49px;
    height: 48px;
    border-radius: 25px;
    box-sizing: border-box;
    background: rgba(102, 153, 102, .75);
    vertical-align: middle;
    transition: all .5s ease-in-out;
    z-index: 2;
    position: relative;
    left: -53px;
    top: -3px;
    color: white;
    margin-right: -35px;
}
.tick + label span:before {
    content:"☐";
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    box-sizing: border-box;
    vertical-align: middle;
    text-align: center;
    line-height: 48px;
    position: relative;
    color: white;
    font-size: 1.5em;
}
.tick + label {
    line-height: 50px;
    background: rgba(102, 153, 102, .75);
    display: block;
    border-radius: 25px 0 0 25px;
    border: 2px solid rgba(102, 153, 102, .75);
    transition: all .3s ease-in-out;
    z-index: 0;
    overflow: hidden;
    height: 50px;
    color: white;
}
.tick + label:before {
    position: relative;
    z-index: 1;
    content:"";
    display: inline-block;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    top: -3px;
    left: -2px;
    box-sizing: border-box;
    vertical-align: middle;
    box-shadow: 0 0 25px 0 rgba(0, 0, 0, .75) inset;
}
.tick:checked + label {
    color: #454545;
    background: rgba(255, 153, 102, .75);
    border: 2px solid rgba(255, 153, 102, .75);
}
.tick:checked + label span {
    background: rgba(255, 153, 102, .75);
    transform: rotateY(360deg) rotateZ(360deg);
}
.tick:checked + label span:before {
    color: #454545;
    content:"☑";
}
button[type="submit"] {
    display: block;
}