存储在C:\中的图像作为html文档的背景

存储在C:\中的图像作为html文档的背景,html,background-image,Html,Background Image,我有一行很好的代码 <html style="background-image:url(file:///C:\inetpub\wwwroot\lifehacks.png); background-repeat:repeat; background-attachment:fixed; overflow:scroll;"> 它工作得很好。我将图像保存到wwwroot文件夹中,该文件夹包含我的html文档。为什么现在不显示图像?如果图像与html文档位于同一文件夹中,您可以执行以下操作:

我有一行很好的代码

<html style="background-image:url(file:///C:\inetpub\wwwroot\lifehacks.png); background-repeat:repeat; background-attachment:fixed; overflow:scroll;">

它工作得很好。我将图像保存到wwwroot文件夹中,该文件夹包含我的html文档。为什么现在不显示图像?

如果图像与html文档位于同一文件夹中,您可以执行以下操作:

<html style="background-image:url(lifehacks.png); background-repeat:repeat; background-attachment:fixed; overflow:scroll;">


一个穴居人这么容易就能做到这一点,这让我质疑自己的智商,因为我没有这么做。谢谢,很好用!对不起,它告诉我要等11分钟,但那时我正忙于开发我的网站:p
<html style="background-image:url(lifehacks.png); background-repeat:repeat; background-attachment:fixed; overflow:scroll;">