X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style transitionDuration Property

Style Object Reference Style Object

Example

Speed up the transition effect:

document.getElementById("myDIV").style.transitionDuration="1s";

Try it yourself »


Definition and Usage

The transitionDuration property sets or returns how many seconds (s) or milliseconds (ms) a transition effect takes to complete.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The transitionDuration property is supported in Internet Explorer 10, Firefox, Opera, and Chrome.

Safari supports an alternative, the WebkitTransitionDuration property.


Syntax

Return the transitionDuration property:

object.style.transitionDuration

Set the transitionDuration property:

object.style.transitionDuration="time|initial|inherit"

Property Values

Value Description
time Specifies how many seconds or milliseconds a transition effect takes to complete. Default value is 0, meaning there will be no effect
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: 0
Return Value: A String, representing the transition-duration property of an element
CSS Version CSS3


Related Pages

CSS reference: transition-duration property


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook