How to set viewport meta for iPhone that handles rotation properly?

前端 未结 9 1780
情话喂你
情话喂你 2020-11-27 10:11

So I\'ve been using:


to get my HTML c

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 10:54

    Why not just reload the page when the user rotates the screen with javascript

    function doOnOrientationChange()
    {
    location.reload();
    }
    
    window.addEventListener('orientationchange', doOnOrientationChange);
    

提交回复
热议问题