如何使用jquery获取屏幕的“高度” [英] How to get the 'height' of the screen using jquery

查看:79
本文介绍了如何使用jquery获取屏幕的“高度”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在屏幕中间设置一些东西



谢谢

解决方案

  $(窗口).height(); //返回浏览器视口的高度
$(document).height(); //返回HTML文档的高度

如下所示: http://api.jquery.com/height/


I want to set something in the middle of the screen

thanks

解决方案

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document

As documented here: http://api.jquery.com/height/

这篇关于如何使用jquery获取屏幕的“高度”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆