Allowed properties for CSS transition
Is there a de facto list of properties that can be transitioned using CSS3 transitions? For example the display property cannot currently be transitioned but visibility can (although just from hidden to visible with no duration).
There is a note one the MDN that says:
Note: The set of properties that can be animated is subject to change; as such, you should avoid including any properties in the list that don't currently animate, because someday they might, causing unexpected results.
However, I can't see from the transition-property spec which properties are currently allowed.
Is this down purely to browser implementation or is it defined somewhere?
For the properties that existed at the time of creating the CSS Transitions Module, the list can be found in the specification itself:
http://www.w3.org/TR/css3-transitions/#animatable-properties
For future properties or future changes to existing properties, refer to the properties in the specification for an Animatable line:
For properties that exist at the time this specification was developed, this specification defines whether and how they are animated. However, future CSS specifications may define additional properties, additional values for existing properties, or additional animation behavior of existing values. In order to describe new animation behaviors and to have the definition of animation behavior in a more appropriate location, future CSS specifications should include an "Animatable:" line in the summary of the property's definition (in addition to the other lines described in [CSS21], section 1.4.2). This line should say "no" to indicate that a property cannot be animated or should reference an animation behavior (which may be one of the behaviors in the Animation of property types section above, or may be a new behavior) to define how the property animates. Such definitions override those given in this specification.
Example:
There's also a list on the MDN itself.
链接地址: http://www.djcxy.com/p/27424.html上一篇: 取消父元素悬停时子元素的转换?
下一篇: 允许CSS转换的属性