2017.07.07
12个月
2017.07.08
I want to pass
item2 .tcc:nth-of-type(2) .icon{}
Why is it invalid to add a style to the second tcc class name element? I thought about it later, do all pseudo-class selectors likenth-of-type
require element tags before them? The tutorials on the Internet seem to be all about it, can't it be a class name?
Because
is also p, so the second tcc is actually nth-of-type(3)
Not to mention whether
nth-of-type
needs to be explicitly specified,:nth-of-type(n)
refers to selecting the nth child element with the specified type in the parent element, and your second.tcc
is the 3rd child element of.item2
, not the 2nd. Maybe you should write it as.item2 .tcc:nth-of-type(3) .icon {}
replaced with