Style transitionProperty Property

Example

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

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

Description

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

The numbers in the table specify the first browser version that fully supports the property.

Property
transitionProperty 26.0 10.0 16.0 6.1 12.1

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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.