我希望我能展示更多,但问题很简单。按照 github 说明,我放置:
$.backstretch("path/to/image.jpg");
在 JS 中。它确实应用了 bg,但不适用于身体本身。在内部主体的末端粘贴:
<div class="backstretch" style="left: 0px; top: 0px; overflow: hidden; margin: 0px; padding: 0px; z-index: -999999; position: fixed; width: 1920px; height: 717px;"></div>
我也尝试了以下方法:
$('body').backstretch("path/to/image.jpg");
它根本不想应用于身体。我需要它在身体上的魔力,因为我相信这样做会解决一个 chrome 错误。