【问题标题】:Different page orientation for JQuery Mobile [duplicate]JQuery Mobile的不同页面方向[重复]
【发布时间】:2012-05-05 03:21:33
【问题描述】:

我的 JQuery Mobile 项目中有 2 个页面。我希望第 1 页固定为纵向,第 2 页固定为横向。

可以吗?

【问题讨论】:

    标签: jquery-mobile


    【解决方案1】:
    when you click on a link to open page then check window.orientation, then change your page accordingly . As well as implement event orientationchange and whenever orientation is changed then open the relevent page.
    

    您可以使用以下来更改/浏览到相关页面

    $.mobile.changePage("#LandscapePage", { transition: "slide" });

    如果您需要进一步的帮助,请询问

    【讨论】:

    • 我只是想找到一种在用户选择第 2 页时自动旋转页面的方法。所以,我只需要找到一种方法来设置该页面的方向。是通过 JQuery Mobile 吗?
    • 我担心这是不可能的,因为即使通过 Xode 也无法锁定方向,您可以做的是检测方向并尝试相应地旋转页面正文,即 $('body').css ({ "-webkit-transform": "rotate(" + new_orientation + "deg)" }); .你可以从类似的帖子中获得帮助stackoverflow.com/questions/7009743/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-09
    • 1970-01-01
    • 2013-03-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多