Interactive online courses HTML Academy
2026-03-09 10:58 Diff

Now let’s work on the radio buttons. We can animate the moment they are selected using transitions.

Here let’s use the :checked ~ device again, and let’s also assign transitions for the pseudo-elements.

First, let’s create the radio buttons and labels, then hide the radio buttons. Leave the labels. The label::before label pseudo-elements will be used as the circles for the radio buttons. The styles are already ready for them.