I suppose what you can do is create a container that fills the window, and then put the gears in that container.
For example, you can place a container containing animation at the top of the file with a very low z-index, which is suitable for the window and has a fixed position. You place your content on top and pretend css4 just came out with support for .avi backgrounds. Just kidding. The code:
<body> <div id="cogs"> // Your awesome cog pictures </div> <div id="content"> // Your awesome content </div> </body>
The css for the animation container might look like this:
#cogs { width: 100%; height: 100%; position: fixed; text-align: center; overflow: hidden; z-index: -100; }
CSS-based animation works like this, but with various vendor prefixes:
@keyframes rotateCogOne { 0% { -webkit-transform:rotate(0deg); } 100% { -webkit-transform:rotate(360deg); } }
And then you apply the animation like this:
Without writing the animation inside the canvas element, I think you will be pretty limited. In particular, scaling animations according to different resolutions will be difficult (impossible) with strict css and html. It can still look cool, although perhaps it still meets your needs. Also, if the animation is not supported, you can still have a cool array of gears in the background or just go back to javascript based animation.
I put together a basic example of how you could do this with css and html. Here is the full screen . There are still questions that I think ... This is definitely incomplete ... But, I hope, a step in the right direction. You can expand the same methods to more gears to look more like your current page.
If you chose this route (and I'm not sure I recommend it), it would be better to design an animation with a resolution that would look good in the range from 800x600 to 1400x100. If you have statistics, go to the most common size of your window.