Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css checked

div,
select {
  margin: 8px;
}

/* Labels for checked inputs */
input:checked + label {
  color: red;
}

/* Radio element, when checked */
input[type="radio"]:checked {
  box-shadow: 0 0 0 3px orange;
}

/* Checkbox element, when checked */
input[type="checkbox"]:checked {
  box-shadow: 0 0 0 3px hotpink;
}

/* Option elements, when selected */
option:checked {
  box-shadow: 0 0 0 3px lime;
  color: red;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #css #checked
ADD COMMENT
Topic
Name
2+9 =