导航

orientationchange不管用啊

Posted on 2015-10-03 09:46  powerlx  阅读(324)  评论(0编辑  收藏  举报
  • 首先引入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>

    这段代码放入页面