I want to show content only for checked input and only one input can be checked at a time. I just want to know how to uncheck previously checked input so that only one input remain checked at a time. I want this functionality only using css not js. I know how to do this in js. This is my code for this.
input {
display: none;
}
.content {
padding: 5px 0px;
margin: 0 0 1px 0;
border-radius: 3px;
color: hsl(240, 6%, 50%);
font-size: 14px;
overflow: hidden;
height: 0;
opacity: 0;
transition: height 0.4s, opacity 0.4s;
}
input:checked ~ .content {
height: 60px;
opacity: 1;
}
Github repo: https://github.com/rishipurwar1/faq-accordion-card-main