Can I use an image from my local file system as background in HTML?

后端 未结 5 1894
粉色の甜心
粉色の甜心 2020-12-05 09:12

I\'ve got an HTML document hosted on a remote web server. I\'m trying to have one of the elements on the web page use an image file from my local file system as its backgrou

5条回答
  •  星月不相逢
    2020-12-05 09:54

    It seems you can provide just the local image name, assuming it is in the same folder...

    It suffices like:

    background-image: url("img1.png")
    

提交回复
热议问题