0

请访问: http: //morningside.cardboardmonet.com/

请注意,网站拖动从左到右滚动,但是当您调整窗口大小时它不会缩放 - 页面只是变成空白。有谁知道如何解决这一问题?

谢谢!

4

1 回答 1

0

chacelove,请将这段代码添加到你的 js 中

$(document).ready(function() {
    initDrag();
});
//
function resize_adjustments() {
    $("#proof").css('width', '100%');
    $("#proof").css('height', '100%');
    $("#proof > div").each(function(i) {
        if($(this).css('left') == "0px") {
            current = $(this).attr('id');
            $(this).css('left', '0');
        } else {
            $(this).css('left', $("#proof").width()+"px");
        }
    });
}
var resizeTimer = null;
$(window).bind('resize', function() {
    if (resizeTimer) clearTimeout(resizeTimer);
    resizeTimer = setTimeout(resize_adjustments, 500);
});

它起作用了吗?

于 2012-08-30T16:13:51.807 回答