CSS 상속의 개념 · 상위에 적용된 것은 하위에도 적용됨 · 특정하위에 있는 속성은 유지된다. ex) width, border -> box-model 우선순위 · 동일 조건일 경우 구체적으로 선택자 선언이 되어있는 것이 우선적용 ex) body > span 과 span 이 있을경우 body > span 우선순위를 갖는다. · 동일 조건일 경우 나중에 선언된 것이 우선적용 · id > class > element 더 많은 우선순위조건이 있다. 아래사이트 참고 https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity Specificity Specificity is the means by which browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied.
Specificity is based on...
#
css
#
css우선순위
#
study
#
Webprogramming
원문 링크 : 상속과 우선순위 결정