You don’t need JavaScript

css-custom-checkboxes

CSS is powerful, you can do a lot of things without JavaScript.

A quite commonly known example is usage of the Adjacent Sibling Selector (viz. +) to build custom radio buttons/checkboxes or tab interfaces.

See the Pen CSS Custom Checkboxes / Radio Buttons by Bramus! (@bramus) on CodePen.

With a few more CSS tricks such as the :target/…/:active/:checked pseudo-classes, the ::after/::before pseudo-elements, and the attr() CSS function one can achieve some other great effects:

You don’t need JavaScript is a repo that aggregates many of these β€œPure CSS” Solutions.

You don’t need JavaScript →

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.