<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
@keyframes cb_after {
from {
opacity: 0;
height: 0;
}
to {
opacity: 1;
height: 50px;
}
}
@keyframes cb_before {
from {
opacity: 0;
height: 0;
}
to {
opacity: 1;
height: 130px;
}
}
body {
width: 100%;
height: 100%;
}
.checkbox-warp {
width: 100px;
height: 100px;
margin: 100px auto;
}
.checkbox-warp input[type="checkbox"] {
display: none;
}
.checkbox-warp label {
position: relative;
display: block;
width: 100%;
height: 100%;
border: 15px solid #000000;
}
.checkbox-warp label::after,
.checkbox-warp label::before {
position: absolute;
content: "";
display: block;
width: 20px;
background-color: #36AB19;
border-radius: 5px;
transform-origin: left top;
}
.checkbox-warp label::after {
left: 6px;
top: 60px;
transform: rotate(-55deg);
}
.checkbox-warp label::before {
left: 50px;
top: 90px;
box-shadow: 0 0 0 5px #FFFFFF;
transform: rotate(-145deg);
}
.checkbox-warp input[type="checkbox"]:checked+label {
border-color: #36AB19;
}
.checkbox-warp input[type="checkbox"]:checked+label::before {
animation: cb_before .2s .2s forwards linear;
}
.checkbox-warp input[type="checkbox"]:checked+label::after {
animation: cb_after .2s forwards linear;
}
</style>
</head>
<body>
<div class="checkbox-warp">
<input type="checkbox" id="check-box" />
<label for="check-box"></label>
</div>
</body>
</html>