web-屏幕、浏览器、页面-width and height
来源:互联网 发布:windows 10 虚拟显存 编辑:程序博客网 时间:2024/06/05 02:45
1、screen:屏幕
screen.height:屏幕高度
screen.width:屏幕宽度
screen.availHeight:屏幕可用高度(即,屏幕高度减去上下任务栏后的高度)
screen.availWidth:屏幕可用宽度(即,屏幕宽度减去左右任务栏后的宽度)
任务栏高(宽度-width)= screen.height - screen.availHeight
2、window:浏览器
window.outerHeight:浏览器高度
window.outerWidth:浏览器宽度
window.innerHeight:浏览器内页面可用高度(可表示为:浏览器当前高度去除浏览器边框、工具条后的高度)
window.innerWidth:浏览器内页面可用宽度(可表示为:浏览器当前宽度去除浏览器边框后的宽度)
工具栏高/宽度:包含了地址栏、书签栏、浏览器边框等范围
3、body:页面
body.offsetHeight:body总高度
body.offsetWidth:body总宽度
body.clientHeight:body在浏览器内显示的区域高度
body.clientWidth:body在浏览器内显示的区域宽度
(滚动条高度(宽度)= window.innerHeight-body.clientHeight
阅读全文
0 0
- web-屏幕、浏览器、页面-width and height
- 得到屏幕的Width And Height
- 【浏览器】screen.width/height 屏幕宽高(屏幕像素) ---- 定值
- 页面可视区域width、height
- Android 屏幕 width 和 height 的获取
- Set Height and Width Pie Chart
- studyjams notes 1B--width and height
- Web前端-HeadFirst-笔记-图片-height width
- IOS 屏幕横转后怎么判断屏幕的width和height
- width height
- yuv420sp crop from any startpoint and width and height
- 火狐浏览器中Div为空时height,width不起作用
- 兼容浏览器的min-height和min-width
- 兼容浏览器的min-height和min-width
- 浏览器 获取图片width 和height 的方法
- 兼容浏览器的min-height和min-width
- 如何利用DOM获取当前页面的width和height?
- Calculate height and width of GIF/JPG files
- Retrofit — Getting Started and Creating an Android Client
- 安装操作Mysql遇到的问题集合
- 常见的web服务器
- Windows下SVN服务器搭建与使用图文教程(三)
- 智慧城市案例分享
- web-屏幕、浏览器、页面-width and height
- hibernate环境搭建
- CMake入门学习+实战<二> helloworld完善
- shutdown -r now 命令与reboot命令都是重新启动,有什么区别吗?
- Spark配置—Standlone模式
- tcp十一种状态及问题处理方法
- html通过js获取java传过来的cookie
- LVS FULLNAT模式下客户端真实地址的传递
- Gstreamer官方教程汇总1---Hello World