Hover over a div element to gradually change its width and height:
The transitionProperty property specifies the name of the CSS property the transition effect is for (the transition effect will start when the specified CSS property changes).
Tip: A transition effect could typically occur when a user hover over an element.
Note: Always specify the transitionDuration property, otherwise the duration is 0, and the transition will have no effect.
The transitionProperty property is supported in Internet Explorer 10, Firefox, Opera, and Chrome.
Safari supports an alternative, the WebkitTransitionProperty property.
Note: The transitionProperty property is not supported in Internet Explorer 9 and earlier versions.
Return the transitionProperty property:
Set the transitionProperty property:
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 |
Default Value: | all |
---|---|
Return Value: | A String, representing the transition-property property of an element |
CSS Version | CSS3 |
CSS reference: transition-property property