使用documentElement正确取得当前可见区域的大小
作者:whsnow 时间:2024-04-18 09:34:06
其他方法都不适用,只有这个documentElement才能正确取得当前可见区域的大小
var w = parseInt(document.documentElement.clientWidth);
var h = parseInt(document.documentElement.clientHeight);
标签:可见区域,documentElement
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
mysql 5.7.16 免安装版安装配置方法图文教程
2024-01-15 18:42:17
![](https://img.aspxhome.com/file/2023/3/107443_0s.jpg)
Python关于OS文件目录处理的实例分享
2022-12-29 08:52:07
用asp给网站添加rss聚合功能
2007-11-05 19:08:00
在element-ui的select下拉框加上滚动加载
2024-04-17 10:04:14
golang 两个go程轮流打印一个切片的实现
2024-02-12 09:11:29
python 用struct模块解决黏包问题
2023-08-18 02:13:20
Python pyinotify模块实现对文档的实时监控功能方法
2023-04-15 08:13:52
python中如何写类
2023-09-02 18:19:58
在Python中使用next()方法操作文件的教程
2023-01-17 11:21:40
Jupyter notebook 远程配置及SSL加密教程
2021-06-24 07:15:06
![](https://img.aspxhome.com/file/2023/5/115175_0s.jpg)
go实现服务优雅关闭的示例
2023-08-06 09:01:08
![](https://img.aspxhome.com/file/2023/7/90487_0s.jpg)
Css Reset(复位)整理
2008-09-09 21:58:00
使用Python实现 学生学籍管理系统
2023-08-21 18:42:47
![](https://img.aspxhome.com/file/2023/6/90556_0s.png)
FrontPage XP设计教程2——网页的编辑
2008-10-11 12:16:00
![](https://img.aspxhome.com/file/UploadPic/200810/17/20081017121938712s.jpg)
Python之str操作方法(详解)
2021-07-21 09:14:16
vuex 第三方包实现数据持久化的方法
2024-04-30 10:34:56
php+lottery.js实现九宫格抽奖功能
2024-04-17 10:34:28
![](https://img.aspxhome.com/file/2023/1/136231_0s.jpg)
Python入门_浅谈逻辑判断与运算符
2023-11-09 05:45:26
![](https://img.aspxhome.com/file/2023/8/64668_0s.png)
Golang常用环境变量说明与设置详解
2024-05-13 10:43:40
网站鼠标变变变!
2010-10-20 20:09:00