jquery获取浏览器窗口的宽度和高度
jquery获取浏览器当前窗口的大小,获取当前浏览器页面的宽带和高度
让元素填充整个屏幕代码如下
$(document).ready(function() {
/*replace the "body" tag with the class or id that you want to fit full screen
example:
$('#content').css('width', $(window).width()+'px');
$('#content').css('height', $(window).height()+'px');
*/
$('body').css('width', $(window).width()+'px');
$('body').css('height', $(window).height()+'px');
});
来源://作者:/更新时间:2014-02-08
顶
踩
相关文章:



