Tag: DISABLE

Blog

CSS Disable Checbox

Today, I needed to disable checkbox using CSS only without any HTML attribute.
Here is the code:

HTML:

<input type="checkbox" checked="checked" />
<!-- using opacity -->
<input type="checkbox" checked="checked" />
<!-- using layer -->
<input type="checkbox" checked="checked" />

CSS:

input[type="checkbox"]:nth-child(2)