我尝试使用以下HTML标记为内容的一部分应用样式:
<li class="views-row views-row-9 views-row-odd tid-106
">
<span><a href="/fiche/bac-pro-csr">BAC Pro Commercialisation et services en restauration - CSR</a>
<br><span class="complement">
Bac Pro CSR avec Restaurant d'application (Section Européenne)
</span><br>
Section Européenne
</span>
</li>
我只想要一个样式为“Section Européenne”的文本,并从span中排除内容。补充,所以我尝试在sass中不起作用的方法:
li{
&:not(img):not(a):not(.complement){
font-weight: bold;
/*-webkit-text-stroke:em(1px) $gris-anthracite;//Contour de texte*/
}
&:matches(.complement){
font-weight: initial;
}}
有可能做到这一点吗?
是否可以通过:not排除span via的span子级?
像这样的?
&:not(img):not(a):not(>span.complement){}
谢谢