JavaScript would be a horribly bad choice for that. JS is single-threaded, so even though it is possible to update the properties continuously (or, rather, at an interval using setInterval() -- you want people to be able to see the changes, I'd assume), it would cause (and be affected by) blocking elsewhere on the page. You may find that event capture becomes unreliable, or that users do things multiple times because they don't see the effects of their actions immediately, and the animation effect will occasionally stall as other things happen on the page.
CSS transitions would throw the changes into a separate thread in the browser, which would mean that the rest of the UI is usable while the transitions are happening, but that won't work with Internet Explorer (current and older versions). That pretty much leaves an animated GIF used as a border-image -- it still won't work on older versions of IE, but it will work across all current browser versions.