简体   繁体   English

$(window).height在Internet Explorer中是否不同?

[英]$(window).height is different in internet explorer?

I currently have a vertical scrolling website with multiple divs, 我目前有一个具有多个div的垂直滚动网站,

http://dirkdunn.com http://dirkdunn.com

there are 4 divs, so when targeting, I can do $(window).height / 4, 有4个div,因此在定位时,我可以执行$(window).height / 4,

however, internet explorer looks at window height as the viewport, and not the whole scrolling screen, and in turn I get a screen with very small divs, 但是,Internet Explorer将窗口高度视为视口,而不是整个滚动屏幕,因此我得到的屏幕具有很小的div,

is there an equivalent to IE that I can use to that it will look at it like the other browsers? 有没有可以与其他浏览器一样浏览的IE等效项?

Instead of using using $(window).height try using $(window).innerheight for more details visit this . 代替使用$(window).height尝试使用$(window).innerheight获取更多详细信息,请访问this If you want to know more about height, innerheight, outerheight, outerheight(true) visit this 如果您想进一步了解高度,内部高度,外部高度,外部高度(true),请访问

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM