Ho tag div
contenente diversi tag ul
.Come posso usare un selettore no: first-child?
Se io cercando di impostare le proprietà CSS solo per il primo ul
tag, e questo codice funziona:
div ul:first-child {
background-color: #900;
}
quando voglio impostare le proprietà CSS per ogni ul
tag eccetto il primo, ho provato questo:
div ul:not:first-child {
background-color: #900;
}
anche questo:
div ul:not(:first-child) {
background-color: #900;
}
e questo:
div ul:first-child:after {
background-color: #900;
}
Ma a nessun effetto. Come devo scrivere in CSS: "ogni elemento, tranne il primo"?
li: non (: first-child) – zloctb