I've successfully implemented a loading indicator using CSS3 keyframes, which animates its width from 0% to 100% when the .loading
class is added to my loading bar. However, once the loading is complete, I want to smoothly transition out of the keyframes. Instead of abruptly jumping to 100%, I would like it to ease its way towards 100% where it will remain.
I've attempted to add a transition
and animation
to my loading bar class, but unfortunately, neither approach seems to be effective. How can I achieve the desired effect?
Check out the jsFiddle for reference.