【问题标题】:With 2 buttons at footer. right side button going outside page jQuery mobile在页脚有 2 个按钮。右侧按钮离开页面jQuery移动
【发布时间】:2013-06-11 04:41:33
【问题描述】:

我想在页脚中有 2 个按钮,一个在左侧,另一个在右侧。

固定数据位置,但右侧按钮在页面视图之外几乎没有。

这里是代码。

<div data-role="footer" data-theme="d" class="ui-bar" style="height:30px"  data-position="fixed">       
    <a class="ui-btn-left" data-role="button" data-theme="a" id="approvetm">
            Approve
    </a>

    <a id="sendback" data-rel="popup"  data-theme="a"  class="ui-btn-right" data-role="button" data-inline="true">Send Back</a> 
</div>

你能告诉我上面的代码有什么问题吗.....?

【问题讨论】:

    标签: jquery-mobile footer


    【解决方案1】:

    根据jQuery Mobile documentation,在按钮调节方面,页脚与页眉不同。

    页脚在选项和配置方面与页眉非常相似。主要区别在于页脚被设计为比页眉结构更少,以提供更大的灵活性,因此框架不会像在页眉中那样自动为左侧或右侧的按钮保留插槽

    但是,可以通过覆盖 ui-btn-right 样式(正确位置)来解决此问题。

    .ui-footer .ui-btn-right { right: 35px !important }
    

    Demo

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-06
      • 2020-03-03
      • 1970-01-01
      • 2023-03-04
      • 2020-03-01
      • 2012-08-28
      相关资源
      最近更新 更多