【问题标题】:Onsen UI: button, aligned to bottomOnsen UI:按钮,与底部对齐
【发布时间】:2017-04-18 10:11:02
【问题描述】:

我正在使用 onsen-ui 创建应用程序。

这是我的“删除”按钮的代码

<div class='form-well'>
    <br><br>
    <ons-button style="background-color: red;" modifier="large">Delete</ons-button>
</div>

一切都很好,“删除”按钮有合适的大小和颜色,但我希望它在底部对齐。

图书馆(温泉)是否有适当的“onsenish”方式来做到这一点,或者我应该使用通用 html 模式(如 How to align content of a div to the bottom?)并自己猜测像素?

【问题讨论】:

    标签: javascript css onsen-ui2


    【解决方案1】:

    像这样使用 css position 属性,我只是使用按钮来理解你可以在那里使用 button classid

    button {
       position: absolute;
       bottom:0;
       left:0;
    }
    

    【讨论】:

    • 这基本上是“没有温泉支持”。好的。
    【解决方案2】:

    您可以通过 onsen.io 找到答案

    https://onsen.io/blog/auto-style-app-onsen/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-11
      • 2017-01-29
      • 2022-07-07
      • 2017-11-23
      • 2018-07-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多