orientationchange不管用啊

  • 首先引入JQuery Mobile包,将

    <script>

    //手持设备方向改变时执行

       $(window).bind( 'orientationchange', function(e){

        var height=document.body.clientHeight - 195;

        $("#content").css("min-height",height);

        $("#thumb").css("margin",height/4.2 + "px auto");

        });

    </script>

    这段代码放入页面

原文地址:https://www.cnblogs.com/powerlx/p/4853073.html