[英]Get document dimensions with body.height = 0px
如果“body”元素应用了 css 样式,我如何获取文档尺寸(宽度和高度):
body {
height: 0px;
}
使用这个简单的方法
document.body.style.height // returns '0px'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.