본문으로 바로가기

/* one item */

div:nth-child(1):nth-last-child(1) {

width: 100%;

}


/* two items */

div:nth-child(1):nth-last-child(2),

div:nth-child(2):nth-last-child(1) {

width: 50%;

}


/* four items */

div:nth-child(1):nth-last-child(4),

div:nth-child(2):nth-last-child(3),

div:nth-child(3):nth-last-child(2),

div:nth-child(4):nth-last-child(1) {

width: 25%;

}