I have a background image which currently repeats vertically and is centered on the page. Here's some ASCII art to describe the image, with left and right hand sides marked.
----------
| |
| |
|L R|
| |
| |
----------
I'd like to have the image repeated across the whole browser window by having the it flipped along the vertical edge each time:
----------------------------------------
| || || || |
| || || || |
|L R||R L||L R||R L|
| || || || |
| || || || |
----------------------------------------
Now, I could create an image like the following one have have it repeat using CSS:
--------------------
| || |
| || |
|L R||R L|
| || |
| || |
--------------------
However, this image is already much bigger than I want it to be, so making it 2 times larger is out of the question (especially since I plan on having a retina version too!). I thought that doing this in Javascript could be a good compromise.
Does anyone know of a JS library that can already handle this, or else point me to a resource that would give me a decent head start?
Thanks,
Tim