Selector CSS3, Nth Child Incrementing por 1
-
26-12-2019 - |
Pregunta
Estoy usando el selector CSS3 para seleccionar diferentes niños.es su alternativa en lugar de codificarlo
.checkout_main .check_tr th:nth-child(1){
width:50px;padding-left:10px;
}
.check_tr th:nth-child(2){
width:300px;padding-left:10px;
}
.check_tr th:nth-child(3){
width:50px;padding-left:10px;
}
.check_tr th:nth-child(4){
width:100px;padding-left:10px;
}
Solución
Hay dos alternativas
You can use odd even
:nth-child(odd)
{
width: 100px;
}
:nth-child(even)
{
width:200px;
}
Otra forma es que tienes que formular un + b.Luego funciona, hágamelo saber su HTML.Intentaré y le diré una forma + B.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow