아래처럼 하면 될 것 같네요.
.form_group{
display: flex;
flex-direction: column;
}
#test{
order: 2;
}
#title{
order: 1;
}
#test:checked~#title {
display: none;
}
<div class="form_group">
<input type="checkbox" id="test" />
<h1 id="title">Just a text</h1>
</div>
© 2023 OneMinuteCode. All rights reserved.