I would like to have images for my background that change automatically like a slide show. But I would like the images to fill the background no matter what size the browser window is…and if it is scaled down, the aspect ratio of the image does not change.
Here is an example of what I’m trying to do:
How can I accomplish these tasks? Any help will be much appreciated.
You can’t, at least not like you are trying to now.
What you can do, however, is create an
<img>instead, and with css setposition:absolute, scale it to 100% width and crop it from the parent withoverflow:hiddenexample: http://jsfiddle.net/GHmz7/4/