I am trying to display an image as my background that has been saved locally within my Eclipse project.
My folder layout is as follows:
assets
www
myimage.jpg
index.html
Currently, in my index.html
file I have the following:
<body background-image:url("www/myimage.jpg")>
However, the background image is not appearing...
Anyone know what the problem might be?
Thanks for your help.
Move it to a ruleset in your stylesheet, and fix the path.
<style>
body {
background-image: url("myimage.jpg");
}
</style>
do it like quentin said.
furthermore you can do this:
<body style="background-image:url('www/myimage.jpg')">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.