<html>
<head>
<style>
.item-label::before {
border: 1px solid #000000;
content: "";
height: 22px;
left: 0;
position: absolute;
width: 22px;
}
.item-label::after {
background-image: url("https://cdn2.iconfinder.com/data/icons/flat-ui-icons-24-px/24/checkmark-24-128.png");
background-repeat: no-repeat;
background-size: 100% auto;
content: "";
display: none;
height: 19px;
left: 2px;
position: absolute;
top: 0;
width: 19px;
}
input[type="checkbox"]:checked + .item-label::after {
display: block;
}
</style>
</head>
<body>
<label>
<input type="checkbox">
<span class="item-label">demo</span>
</label>
</body>
</html>
<head>
<style>
.item-label::before {
border: 1px solid #000000;
content: "";
height: 22px;
left: 0;
position: absolute;
width: 22px;
}
.item-label::after {
background-image: url("https://cdn2.iconfinder.com/data/icons/flat-ui-icons-24-px/24/checkmark-24-128.png");
background-repeat: no-repeat;
background-size: 100% auto;
content: "";
display: none;
height: 19px;
left: 2px;
position: absolute;
top: 0;
width: 19px;
}
input[type="checkbox"]:checked + .item-label::after {
display: block;
}
</style>
</head>
<body>
<label>
<input type="checkbox">
<span class="item-label">demo</span>
</label>
</body>
</html>
No comments:
Post a Comment