Is there a CSS animation for a floating div that resides on the resizing of the window?


If I have a series of divs all with float: left and I resize the browser so they wrap, can I animate their transition to their new location using only CSS animations (no JavaScript)?

Without using JavaScript that's most likely a no...

CSS transitions and animations rely on the elements' CSS properties changing. The line wrap behavior you're seeing when the window is resized doesn't change the elements' properties, so you won't have anywhere to add a transition.

Even with JavaScript I doubt creating the effect you're after would be trivial, you may want to check out a plugin like Masonry