How do CSS radio tabs work?
问题 Could someone explain how the last part of the code works? Specifically: [type=radio]:checked { } [type=radio]:checked ~ .content { z-index: 1; } I'm just starting with CSS as a newb and wanted to try to create some interactive CSS tabs; which lead me to look at some existing code out there. Needless to say it has left me quite confused. Why is [type=radio]:checked needed? It had z-index: 2; inside the brackets but I took that out and the code still works just fine; although when I try and