我正在使用尾部滑块和改变面板的大小在css文件JQuery。我这样做是为了将尾部滑块调整到大小窗口。这在Firefox中运行良好,但Chrome和Safari会崩溃。谁知道我该怎么解决这个问题?
这就是函数
function resizeCentro() {
var alt = (document.height * 0.95) + "px";
var larg = (document.width * 0.77) + "px";
$(".coda-slider").css('width', larg);
$(".coda-slider").css('height', alt);
$(".panel-wrapper").css('width', larg);
$(".panel-wrapper").css('height', alt);
document.getElementById("ifInicio").width = document.width * 0.95;
document.getElementById("ifInicio").height = document.height * 0.95;
document.getElementById("ifInicio").src = "inicio.html";
}可以在http://www.segundafeirafilmes.com.be/prov/INDEX.html中查看该页面
发布于 2011-05-03 07:11:32
使用moar jQuery:
function resizeCentro() {
$(".coda-slider, .panel-wrapper").width($(document).width() * 0.77;);
$(".coda-slider, .panel-wrapper, #ifInicio").height($(document).height() * 0.95);
$("#ifInicio").width($(document).width() * 0.95);
$("#ifInicio").attr('src', "inicio.html");
}发布于 2011-05-03 07:26:07
document.width和document.height是Netscape 4时代的非标准DOM0,其他浏览器不一定要实现它们。特别是,WebKit没有实现它们。Firefox6也将放弃对它们的支持。
https://stackoverflow.com/questions/5863433
复制相似问题