THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Style transitionProperty Property

Style Object Reference Style Object

Example

Hover over a div element to gradually change its width and height:

document.getElementById("myDIV").style.transitionProperty = "width,height";
Try it yourself »

Definition and Usage

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.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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.


Syntax

Return the transitionProperty property:

object.style.transitionProperty

Set the transitionProperty property:

object.style.transitionProperty="none|all|property|initial|inherit"

Property Values

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

Technical Details

Default Value: all
Return Value: A String, representing the transition-property property of an element
CSS Version CSS3

Related Pages

CSS reference: transition-property property


Style Object Reference Style Object