Make Image Fit To The Screen

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.

[css]
#body {
background: url("//cdn.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;
}
[/css]

Please see other code snippets here: Code-Snippets

Kindest Regards
Sibeesh Venu

Leave a Reply

Your email address will not be published. Required fields are marked *

Serverless 360