I've been attempting to implement the technique demonstrated in this article, but I'm struggling to achieve the desired effect of revealing new elements after a radio button is selected.
.reveal-if-active {
opacity: 0;
max-height: 0;
overflow: hidden;
font-size: 16px;
transform: scale(0.8);
transition: 0.5s;
input[type="radio"]:checked {
opacity: 1;
max-height: 100px;
padding: 10px 20px;
transform: scale(1);
overflow: visible;
}
}
<p>Are you a student or a professional?</p>
<div>
<input type="radio" name="type" value="student" id="student">Student
<div class="reveal-if-active">
<p>Type of student:</p>
<select name="student_types" data-require-pair="#student">
<option display:none disabled selected value></option>
<option value="highschool">High School</option>
<option value="undergrad">Undergraduate</option>
<option value="grad">Graduate</option>
</select>
</div>
</div>