你可以使用 :visible
和 :hidden
选择器来确定元素是否已折叠。
1
2
3
|
|
如果你只是根据元素的可见性对元素执行操作,只需在选择器表达式中包含 :visible
或 :hidden
。例如
1
2
3
4
5
|
|