Gibt es eine Möglichkeit Attributwerte in nth-child(n)
zur Ausgabe das Ergebnis der Verwendung von n zu erhöhen: couldcss Schritt n-Kind Attributwerte
div:nth-child(1){
top: -5px;
}
div:nth-child(2){
top: -10px;
}
div:nth-child(3){
top: -15px;
}
div:nth-child(4){
top: -20px;
}
div:nth-child(5){
top: -25px;
}
Es ist, wenn Sie verwenden, um eine 'Präprozessor 'wie' sass' zum Beispiel –
... sonst ... NEIN. –
... oder füge es mit jquery: $ ('div') hinzu jeder (Funktion (i = 1) {$ (this) .css ("top", -5 * i); i ++;}); –