본문 바로가기

Archived/CSS

list의 첫번째 child 빼고 hover effect 주고싶을 경우

(옳은 예)

&:hover:not(:first-child) {

   scale

  }

 

(틀린 예: 첫번째까지 선택됨)

&:hover:not(first-child) {

   scale

  } 

와 같이 :를 빼먹을 경우 안된다. 근데 not operator는 원래 not(first-child)와 같이 사용되는데 왜 :가 이 경우에 필요한지는 모르겠다.

 

'Archived > CSS' 카테고리의 다른 글

nth child의 의미  (0) 2019.10.25
Grid  (0) 2019.10.23
Flexbox  (0) 2019.10.23
ease-in, ease-out / forwards / animation-delay / box-shadow / overflow-wrap  (0) 2019.10.21