Is it possible to hide a previous element if an element is :target in pure css?
section:not(:target){
display:none;
}
section:target{
display:block;
}
section.main{
display:block;
}
<section class='main'>
...
</section>
<section id='test'>
...
</section>
Now I need to hide section.main if #test is :target.