문제

I have a variable height div fixed div that can change height on orientation change, so ideally I wanted to change the CSS by javascript. However on IE10 Metro using the Surface I can't find any JS event that deals with this? iOS and Chrome both handle it fine.

I have tried onorientationchange and onresize to no avail...

도움이 되었습니까?

해결책

IE 10 doesn’t support Device Orientation Events[0], unfortunately. They do have a prototype[1], but this wont help for browsers that have already been released.

Depending on what you want to do, you may be able to use the orientation Media feature[2] to set a different CSS height value when in portrait or landscape. This is supported by IE[3]

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top