I am trying to create custom checkbox using before and images.My code is
<label for="gbx">
<input type="checkbox" name="gbx" id="gbx">
<span>12344</span>
</label>
Css code here
input {
display: none;
}
span:before{
content: "s";
display: block;
background-image: url("3_.png");
background-repeat: no-repeat;
width: 20px;
background-size: cover;
}
input:checked+ span:before{
content: "vijay";
display: block;
background-image: url("2_.png");
background-repeat: no-repeat;
width: 20px;
background-size: cover;
}
But it is appearing only content is present. If I decrease font-size image also decreasing its size. Why?