transition
transition
英[tr?n?z??n] 美[tr?n?z???n, -?s??-]
property
Property
UK[?pr?p?ti] US[?prɑ:p?rti]
css transition-property property syntax
Function:The transition-property attribute specifies the name of the CSS property that applies the transition effect. (The transition effect will start when the specified CSS property changes). Tip: Transition effects usually occur when the user floats the mouse pointer over an element.
Syntax: transition-property: none|all|property;
Description: none No properties will get the transition effect. All properties will receive the transition effect. Property defines a list of CSS property names that apply transition effects. The list is separated by commas.?
Note: Please always set the transition-duration attribute, otherwise the duration is 0 and no transition effect will be produced.
css transition-property property example
<!DOCTYPE html> <html> <head> <style> div { width:100px; height:100px; background:blue; transition-property: width; transition-duration: 2s; -moz-transition-property: width; /* Firefox 4 */ -moz-transition-duration: 2s; /* Firefox 4 */ -webkit-transition-property: width; /* Safari and Chrome */ -webkit-transition-duration: 2s; /* Safari and Chrome */ -o-transition-property: width; /* Opera */ -o-transition-duration: 2s; /* Opera */ } div:hover { width:300px; } </style> </head> <body> <div></div> <p>請(qǐng)把鼠標(biāo)指針移動(dòng)到藍(lán)色的 div 元素上,就可以看到過渡效果。</p> <p><b>注釋:</b>本例在 Internet Explorer 中無效。</p> </body> </html>
Click the "Run instance" button to view the online instance