+ 1
how to set an image as a background in html
5 Respostas
+ 5
background of a website, is styled in the body element. basically this is what your css would look like to have a background image of your site.
body {
margin: 0;
padding: 0;
background-image: url(images/your_image.png);
background-size: cover;
background-position: center;
background-attachment: fixed;
}
+ 1
choose the background attribute in css or style in line and provide the img url. for example in line would go;
"style ="background:url (../img/pic.jpg);" "
but remember to control the size, the position, if it'll repeat or not.
0
you need css code
0
try set background-image on body{}
0
Write in the body element
<body background="imageurl.imagetype"