Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想覆盖一些 jquery 类,但我只想在这些类出现在 ul li a 下时进行覆盖
是否可以将后代选择器与类选择器结合起来?例如 - 写类似:ul li a .someClass?谢谢
您可以这样做,ul li > a.somelcass这意味着link tag内部ul和liwith 的直接后代class someclass。
ul li > a.somelcass
link tag
ul
li
class someclass