How to select <figure>
only when it contains <iframe>
?
I need to select this figure
:
<figure>
<iframe></iframe>
</figure>
How to select <figure>
only when it contains <iframe>
?
I need to select this figure
:
<figure>
<iframe></iframe>
</figure>
3
Answers
does this trick
You can use the :not selector:
You could use
:has()
pseudo-class: