我希望那里有人可以提供帮助。我正在尝试使用 jQuery Backstretch 为 Bootstrap/Wordpress 中的每个特定页面应用不同的背景图像。例如:
首页 - bg image a 关于 - bg image b 新闻 - bg image c 等等...
我已经设法使用标准的 Backstretch 脚本为所有页面显示单个图像,但我完全迷失了(即使在搜索之后)如何应用上述内容。
到目前为止我的代码:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://myurl.co.uk/wp-content/themes/wpbootstra/bootstrap/js/jquery.backstretch.min.js"></script>
<script>
$.backstretch("http://myurl.co.uk/wp-content/themes/wpbootstrap/bootstrap/img/test_bg.jpeg");
</script>
我在我的footer.php 中使用了它。
有没有人有办法解决吗?