Shouldn't css3 transitions animate between height: 100% and height: 200px?
css3 transitions will interpolate the state of the height o开发者_C百科f a div.
Currently, chrome13 will not interpolate if you set the height with a different unit than the previous height
i.e.:
-
set height to 100%
-
set height to 50% (on a different rendering frame)
-
height will animate correctly (assuming proper use of transition)
-
set height to 100px
-
height will not animate
Chrome bug? spec bug?
Illustrative jsfiddle for the motivated: http://jsfiddle.net/zDywJ/21/
I don't think this is a bug in Chrome or in the spec.
As far as I can see, CSS has no way to change a percentage into a pixel unit... so it would not have a way to compare the beginning and end in order to execute the transition.
精彩评论