스타일 transitionProperty 속성
예시
너비와 높이를 점진적으로 변경하려면 div 요소 위로 마우스를 가져갑니다.
document.getElementById("myDIV").style.transitionProperty = "width,height";
정의 및 사용
transitionProperty 속성은 전환 효과가 적용되는 CSS 속성의 이름을 지정합니다(전환 효과는 지정된 CSS 속성이 변경될 때 시작됨).
팁: 전환 효과는 일반적으로 사용자가 요소 위로 마우스를 가져갈 때 발생할 수 있습니다.
참고: 항상 transitionDuration 속성을 지정하십시오. 그렇지 않으면 지속 시간이 0이고 전환이 적용되지 않습니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
transitionProperty | 26.0 | 10.0 | 16.0 | 6.1 3.1 WebkitTransitionProperty |
12.1 |
통사론
transitionProperty 속성을 반환합니다.
object.style.transitionProperty
transitionProperty 속성을 설정합니다.
object.style.transitionProperty = "none|all|property|initial|inherit"
속성 값
Value | Description |
---|---|
none | No property will get a transition effect |
all | Default value. All properties will get a transition effect |
property | Defines a comma separated list of CSS property names the transition effect is for |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 모두 |
---|---|
반환 값: | 요소의 transition-property 속성을 나타내는 String |
CSS 버전 | CSS3 |
관련 페이지
CSS 참조: transition-property 속성
❮ 스타일 개체