这可能吗?
这是我的代码:
$("ul#filterlist li:nth-child(3n)").css("marginTop", "0");
如果我想将其应用于列表,但仅应用于列表中可见的那些项目(有些被隐藏,我不希望它们被计算在内),它将如何实现?我在想类似的事情:
$("ul#filterlist li:nth-child(3n)").not(":hidden").css("marginTop", "0");
但它不会起作用。我也不会尝试任何东西:可见
有任何想法吗?谢谢。