Hamza Dhamiya
Hamza Dhamiya

Reputation: 1287

Animate using CSS3

I have this fiddle.According to this fiddle when the class='hide' is added into any span,it should be animate,however it is not working well.I want to animate the span when a class='hide' is added.It should animate while changing the width.

Upvotes: 1

Views: 76

Answers (1)

Hless
Hless

Reputation: 3326

It is because you are defining width: auto as one of the frames of the animation. CSS animations mostly only work with fixed values.

Try setting width: 100px for example and check it out.

http://jsfiddle.net/MhJ2Y/3/

A solution to this could be getting & setting the width to a fixed value via jQuery on document load.

Upvotes: 3

Related Questions