Selector For An Element With Certain Class, If It Is The One & Only "visible" Child Of Its Parent?
Just today I asked Selector for an element with certain class, if it is the one & only child of its parent? but what about if we need to select elements with a class , if it
Solution 1:
There is no way to determine if an object is "visible" with CSS, so it's not possible. Note that jQuery is also only capable of determining if an object is "visible" for a certain definition of "visible".
Here's an example where it fails:
<body><divstyle="position:absolute; top: -100px">Am I visible?</div></body>
Here is another. Heck, even visibility: hidden
is considered visible. There are lots of creative ways to make something "not visible" to a human, so that term needs a rigorous definition before we are able to start talking tech.
Post a Comment for "Selector For An Element With Certain Class, If It Is The One & Only "visible" Child Of Its Parent?"