css - 如何在ionic2中将按钮移动到 "center-bottom"

标签 css

如何设置水平居中垂直底部?

我尝试像在 Polymer 中一样将 flex 用作 class="layout horizo​​ntal"...

<ion-content class="layout vertical">
  <span class="flex"></span>
<button danger round class="center">Hibás</button>
</ion-content>

最佳答案

这是样式 (CSS) 而不是框架 (Ionic) 的问题,我使用以下效果很好。

<ion-content padding class="">

  <p>Some content</p>

  <div class="bottom" text-center>
    <button block>Submit</button> 
  </div>

</ion-content>

在我的样式表 (app/theme/app.core.scss) 中:

.bottom {
  padding: $content-padding;
  position: fixed;
  bottom:0;
  left: 0;
  right: 0;
}

关于css - 如何在ionic2中将按钮移动到 "center-bottom",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33848975/

相关文章:

css - 以可读的方式呈现长链接列表 HTML

javascript - $.getJSON 不返回数据

html - 我的 Gitlab 存储库上的默认页面出现 404 错误

javascript - 在 iOS 中禁用文本选择标注

html - 如何使用 CSS 对齐 - 初学者请求

html - 固定图像背景

Javascript:如何淡出一个 div 并显示另一个 div?

css - 如果网站是为现代浏览器构建的,那么 box-shadow 是边框的完美替代品吗?

jquery - Bootstrap 如何使固定高度响应?

css - 波浪号 (~) 在 CSS 中是什么意思