Current Scenario: I'm building an application which takes an image and we set the background. I want to serve this application on mobile, desktop, and tablet devices.
Question:
I want to know the best way to stretch and show the image (without involving page lag). How do I incorporate fluid design?
Code:
I am currently trying something like this. Any improvements would help!
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
With modern browsers, the easiest way would be to use the following CSS:
EDIT OP has since added code to their post, so this may not be the most appropriate answer.