채택완료

css질문

2021-07-17 (토) 09:27:37 3,015

파란색 배경이 있는 .float-field.inline 중 마지막 요소를 선택자로 선택하고 싶은데

&:last-of-type 타입을 써도 안되네요;;;

 혹시 아시는분 계실까요?

1994104718_1626481582.0435.jpg

|

답변 2개 / 댓글 3개

채택된 답변
+20 포인트

.float-field-wrap > .float-field.inline:last-child{

}

답변에 대한 댓글 3개

앗 안되나보네요 ㅎ
.float-field-wrap .float-field:last-child{ ..}
이렇게 하니 되네요.

:nth-child() 이용해 보세요.

https://codepen.io/sinbi/pen/gOWWGpJ

답변을 작성하려면 로그인이 필요합니다.