Skip to content Skip to sidebar Skip to footer

Html Body Background Image

In body tag, I added a background-image. But the image is repeated 4 times. How to fix that to display it only single time? HTML code:

Solution 1:

It's background-repeat body

body{
   background-repeat: no-repeat;
}

Solution 2:

You can add style to the body tag using the style attribute:

<bodystyle="background-image:url('image.png');background-repeat: no-repeat;">

Solution 3:

hi now used to this

body{background:url('image.png') no-repeat};

or this

body{
   background-image:url('image.png'); // for your bodybackgroundbackground-repeat: no-repeat;      // for your bodybackground repeat 
}

Solution 4:

Remove background from body and apply your CSS like below.

body
{
  background-image:url('image.png');
  background-repeat:no-repeat;
}

Solution 5:

html { 
      background: url(http://p1.pichost.me/i/64/1886374.jpg) no-repeat center center fixed; 
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
    }
<html><body></body></html>

Post a Comment for "Html Body Background Image"