by @kodeazy

CSS How to remove duplicate images while trying to add background image?

Home » CSS » CSS How to remove duplicate images while trying to add background image?
  • I was trying to add a background image using css but I got a duplicate error as below screenshot. Repeat Image
  • Below is my code.

    <html>
    <head>
    <style type="text/css">
    	body{
    		background-image: url("repeat-image.png");
    	}
    </style>
    </head>
    <body>
    </body>
    </html>
  • To resolve this I added background-size: cover; property in my body part of the code as below.

    body{
    	background-image: url("repeat-image.png");
    	background-size: cover;
    }

    Output: Repeat Image