如果你提供給我們的小提琴,我們可以能夠做別的事情,但一個選項似乎正在改變Windows上的圖像尺寸調整:
$(window).resize(function() {
//in order to call the functions only when the resize is finished
//http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
clearTimeout(resizeId);
resizeId = setTimeout(doneResizing, 500);
});
function doneResizing(){
var windowsWidtdh = $(window).width();
var windowsHeight = $(window).height();
//setting your image dimensions
$('#yourImage').css('height', windowsHeight);
$('#yourImage').css('width', windowsWidtdh);
}
顯示與你撥弄代碼。在那裏,我們可以玩它並告訴你。 – Alvaro