+ 1
Can anyone tell me how to add background image in HTML or CSS? With the aid of an example?
Can anyone tell me how to add background image in HTML or CSS? With the aid of an example?
7 odpowiedzi
+ 2
body {
background-image: url("link");
}
+ 1
1)go to css file
2)select the element you want to add a background to it (exp: body)
3)set the background like this :
background-image:url("image.png");
====≠================
exp:
body{
background-image:url("image.png");
background-size:cover;
}
you can copy a url image from a website and paste it in the url
+ 1
Atul Panda remove img src
just the link of the img.
background-image:url("https://source.unsplash.com/user/erondu/1600x900")
+ 1
Thank you
0
I tried it but it is not functioning. Please insert a link and share me the code
0
This is what I tried. Correct my mistakes if you find the errors