IT

첫 번째 마이너스와 마지막 마이너스의 CSS 선택기

lottoking 2020. 8. 27. 21:22
반응형

첫 번째 마이너스와 마지막 마이너스의 CSS 선택기


저는 매우 진보 된 웹 사이트를 만들고 있습니다. 내 질문 :을 제외한 모든 그것은 다른 아이들을 선택하는 것이 가능 :first-child하고 :last-child? :not()선택기 가 있다는 것을 알고 있지만 괄호 안에 있지 않은 두 개 이상에서는 작동하지 않습니다. 이것이 내가 가진 것입니다.

#navigation ul li:not(:first-child, :last-child) {
    background: url(images/UISegmentBarButtonmiddle@2x.png);
    background-size: contain;
}


시도해 시도 #navigation ul li:not(:first-child):not(:last-child).


물론 작동 할 것입니다. 두 개의 'not'선택기를 선택합니다.

#navigation ul li:not(:first-child):not(:last-child) {

"첫 번째 게임이 아님"과 "마지막 마이 아님"이라고 말하면서 첫 번째 단계 다음 줄까지 계속됩니다.

참고 URL : https://stackoverflow.com/questions/7788018/css-selector-for-other-than-the-first-child-and-last-child

반응형