CSS selectors are pretty handy sometimes when we want to style elements based on user interaction.
To change the style for checked radio button or checkboxes we can use CSS :checked Selector.
The :checked selector matches checked input elements for checkboxes and radio buttons and and option element.
It’s supported in all major browsers.
:checked selector syntax
:checked {
style the checked elements
}
Example Solution
button checkbox css selectors radio style