css transition-property property
Translation results:
transition
transition
英[trænˈzɪʃn] 美[trænˈzɪʃən, -ˈsɪʃ-]
property
Property
UK[ˈprɒpəti] US[ˈprɑ:pərti]
css transition-property propertysyntax
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 propertyexample
<!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>请把鼠标指针移动到蓝色的 div 元素上,就可以看到过渡效果。</p> <p><b>注释:</b>本例在 Internet Explorer 中无效。</p> </body> </html>
Click the "Run instance" button to view the online instance
Popular Recommendations
- View transition theme animations
- property target does not exist on type HTMLInputElement
- UK Law Now Defines Crypto as Personal Property
- Polygon (POL) Migrates 6.50 Billion MATIC Tokens, Marking a Key Milestone in Its Transition Plan
- The UK Parliament introduced the Property (Digital Assets etc), which aims to officially recognize Bitcoin, cryptocurrencies, and other digital assets as personal property.
- Function Decorators in Python: Understanding @property, Getter, and Setter Methods