Frontend/HTML\CSS
css : 인접 형제 결합자 +
종종 메뉴나 목록을 만들 때, 그 사이 구분선을 넣으면서 어쩔 수 없이 :last-child, :first-child를 쓸 일이 있다. 아래와 같은 예를 보자. 1 2 3 4 5 li { width: 50px; height: 20px; display: inline-block; background-color: cornflowerblue; text-align: center; margin: 0 10px; position: relative; } 만약 위 5개의 li 사이에 구분자 '|' 를 넣고 싶다고 해보자. li { width: 50px; height: 20px; display: inline-block; background-color: cornflowerblue; text-align: center; marg..