In this code, we will see how we can set an image to fit the screen completely. By doing this we can make sure that there is repeating of images in the background.
Using The Code
Here I am setting the image to the body tag.
- #body {
- background: url("http://sibeeshpassion.com/content/images/indian%20flag%20banner.jpg") no-repeat center center fixed;
- -webkit-background-size: cover;
- -moz-background-size: cover;
- -o-background-size: cover;
- background-size: cover;
- }
Please see other code snippets here: Code-Snippets.