【问题标题】:Why wont Backgrounder plugin work in Firefox or Explorer为什么 Backgrounder 插件不能在 Firefox 或 Explorer 中工作
【发布时间】:2011-01-19 21:22:40
【问题描述】:
我正在使用带有背景插件的全屏图像,它在 Chrome 中运行良好,但在 Firefox 或资源管理器中不会显示图像,我使用的是 Jquery 4.4
$(document).ready(function(){
$(function() {
$("#my_background").backgrounder();
});
});
<div id="my_background"><img src="../images/bk/luft.jpg" alt="Lufthavn"/></div>
【问题讨论】:
标签:
jquery
jquery-plugins
fullscreen
【解决方案1】:
我在使用后台程序时遇到了同样的问题。我认为最适合您需求的插件是fullscreenr。
用法是这样的:
js
// You need to specify the size of your background image here (could be done automatically by some PHP code)
var FullscreenrOptions = { width: 1024, height: 683, bgID: '#bgimg' };
// This will activate the full screen background!
jQuery.fn.fullscreenr(FullscreenrOptions);
html
<img id="bgimg" src="img/bg.jpg" />