How I can apply border and border-radius css for checkbox

Forums CSSHow I can apply border and border-radius css for checkbox
Staff asked 3 years ago

without used -webkit-appearance: none, -appearance: none css to checkbox.

Answers (1)

Add Answer
Priyank Parekh Marked As Accepted
Staff answered 3 years ago
input[id="cb1"] + label {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #bcbcbc;
  border-radius: 2px;
  cursor: pointer;
}
input[id="cb1"]:checked + label:after {
  position: relative;
  top: -4px;
  left: 2px;
  content: '\2714';
  font-size: 14px;
}
input[id="cb1"] {
  display: none;
}

 

Subscribe

Select Categories