I am using checkboxes on my page. It works fine. However I want one checkbox with light blue color and another with light yellow. Currently both checkboxes are light blue. How can I make another one light yellow?
Here is what I have.
input[type=checkbox] {
position: relative;
cursor: pointer;
margin-right: 10px;
}
input[type=checkbox]:before {
content: "";
display: block;
position: absolute;
width: 16px;
height: 16px;
top: 0;
left: 0;
border: 1px solid #99AFC1;
border-radius: 3px;
background-color: lightblue;
padding: 1px;
}
input[type=checkbox]:checked::before {
background-color: lightblue;
}
input[type=checkbox]:checked::after {
content: "";
display: block;
width: 5px;
height: 10px;
border: solid #ffffff;
border-width: 0 2px 2px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
top: 2px;
left: 6px;
}
<p><label><input type="checkbox" class="filter" value="Test1">Test1</label> <label><input type="checkbox" class="filter" value="Test2">Test2</label></p>