Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

unset

unset CSS 키워드는 initialinherit 키워드의 조합(combination)입니다. 이 다른 CSS 키워드 둘처럼, CSS 단축(shorthand) 속성 all 포함 모든 CSS 속성에 적용될 수 있습니다. 이 키워드는 속성을 부모로부터 상속받은 경우 그 상속값으로 아니면 초기값으로 재설정(reset)합니다. 다시 말해서, 첫 번째는 inherit 키워드처럼 두 번째는 initial 키워드처럼 행동합니다.

p {
  color: red;
}

#sidebar p {
  color: unset;
}
<p>This text is red</p>
<div id="sidebar">
  <p>This text has the default color</p>
</div>

결과

스펙

스펙 상태 설명
CSS Cascading and Inheritance Level 4
The definition of 'unset' in that specification.
Working Draft Level 3에서 변화 없음
CSS Cascading and Inheritance Level 3
The definition of 'unset' in that specification.
Candidate Recommendation 초기 정의

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 41 27 (27) Edge build 10565+ No support No support
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support No support 27.0 (27) No support No support No support

참조

CSS 속성 값: initial, inherit, unsetrevert.

문서 태그 및 공헌자

 이 페이지의 공헌자: Netaras
 최종 변경: Netaras,