transition

transition

英[trænˈzɪʃn] 美[trænˈzɪʃən, -ˈsɪʃ-]

duration

Time

英[djuˈreɪʃn] 美[duˈreɪʃn]

css transition-duration attribute syntax

Function:The transition-duration attribute specifies the time (in seconds or milliseconds) it takes to complete the transition effect.

Syntax:transition-duration: time

Description:time specifies the time it takes to complete the transition effect (in seconds or milliseconds count). The default value is 0, meaning there will be no effect.

Note:Internet Explorer 10, Firefox, Opera, and Chrome support the transition-duration attribute. Safari supports an alternative -webkit-transition-duration property. Internet Explorer 9 and earlier browsers do not support the transition-duration attribute.

css transition-duration attribute example

    

请把鼠标指针移动到蓝色的 div 元素上,就可以看到过渡效果。

注释:本例在 Internet Explorer 中无效。

Run instance »

Click the "Run instance" button to view the online instance