Show no and: yes
P粉396248578
P粉396248578 2024-04-02 19:02:04
0
2
376

Whether to: React positively or negatively to the display: None. This means if you have an element and nothing is displayed on it, will :has still see that there is one? I think it will, because there's an element there. But I might need to compare it with:

:not([style*="display: none"])

Just confirm behavior

P粉396248578
P粉396248578

reply all(2)
P粉633733146

Because of "display:none", we set the style inline in any code where the element will be hidden.



1 This is a paragraph.

2 This is a paragraph.

P粉004287665

display The attribute does not change the behavior of the selector because it does not change the DOM tree, so it will still work

Like if you have

Hi

div:has(p) {
  background: blue;
  padding: 5rem;
}
p {
  display: none;
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template