Radio button show/hide content
问题 I am trying to achieve a show/hide result without javascript and just the radio button. I've managed to get to this part: <label for="show"><span>show</span></label> <input type=radio id="show" name="group"> <label for="hide"><span>hide</span></label> <input type=radio id="hide" name="group"> <span id="content">Content</span> input { display:none; } span#content { display:none; } input#show:checked ~ span#content { display:block; } input#hide:checked ~ span#content { display:none; } Demo: