jQuery(window).height inaccurate

后端 未结 6 1688
挽巷
挽巷 2021-01-04 07:24

I\'m doing a simple test on $(window).height() and I\'m getting a value of 2602 on a screen resolution of 1366 x 768.

jQuery(document).ready(function($){

           


        
6条回答
  •  隐瞒了意图╮
    2021-01-04 07:57

    jquery uses clientWidth and height that returns value of current showing page excluding scroll bar space there is one way to make it accurate do overflow:hidden to your body tag then you will get the original viewport size

提交回复
热议问题