How can you get the window.innerHeight in internet explorer. Thanks.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- Keeping track of variable instances
Easiest way it to use jQuery. Here's some detailed information on it.
A simple one line solution:
This works in IE9:
In ie9, window.innerHeight and document.body.clientHeight only works when the content is higher than the document window.
A reliable solution is to use the vw and vh css properties.
css (easy) way :
js way :