最佳答案
如果你想将其设置为你网站的背景,只需在 CSS 文件中编写即可:
html {
background-image: url(http://oi61.tinypic.com/14o3c3k.jpg)
}
或者通过 jQuery 设置它(你用 jQuery 标记了你的问题,所以我假设你想知道如何这样做)
$("body").parent().css("background-image", "url(" + http://oi61.tinypic.com/14o3c3k.jpg + ")")
//you can also use $("html")… I've just seen cases where that failed for people
关于jquery - 图像叠加 HTML/CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23463458/