javascript jQuery检查窗口高度

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript jQuery检查窗口高度相关的知识,希望对你有一定的参考价值。

.element {
  height: 100vh;
  
} 
var clientHeight = $( window ).height(); 
$('.element').css('height', clientHeight); 

以上是关于javascript jQuery检查窗口高度的主要内容,如果未能解决你的问题,请参考以下文章

jQuery - 动态 div 高度等于整个窗口的高度

jquery的height()和javascript的height总结,js获取屏幕高度

jquery和javascript的height总结

jQuery的height()和JavaScript的height总结,js获取屏幕高度

JQuery获取浏览器窗口的高度和宽度

JavaScript 自动使用jQuery在新窗口中打开外部链接(首先检查域)