ionic-framework - 按钮垂直对齐内的 ionic 微调器

标签 ionic-framework

我试图实现一个 spinner在一个按钮内,但由于某种原因,微调器似乎是顶部对齐而不是垂直居中:
enter image description here

我的代码如下:

<button type="submit" class="button button-block button-positive">
<ion-spinner class="spinner-energized"></ion-spinner> Click me!
</button>

代码笔:http://codepen.io/anon/pen/BjOqvK?editors=1010

知道为什么吗?

最佳答案

Ionic 团队提供了以下解决方案:

.spinner svg {
  width: 16px !important;
  height: 16px !important;
}

New codepen

他们给了我更多的背景信息:

This was not the intended use for ion-spinner, so custom css is needed. You need to adjust the width/height.

关于ionic-framework - 按钮垂直对齐内的 ionic 微调器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35207445/

相关文章:

android - 如何处理 ionic 应用程序中的强制关闭事件?

css - 如何重新计算 ionic 排的高度

typescript - 运行时错误 : Class extends value [object Object] is not a constructor or null

angular - 在 ionic 项目中使用 angular 库时,必须从注入(inject)上下文中调用 inject()

javascript - 通过 HTML 初始化 Angular 2 组件的正确方法

ios - 如何在 ionic 4 angular 项目中全局禁用向后滑动手势

javascript - AngularJS 监听状态变化事件

typescript - Ionic 2修改Index.html

javascript - AngularFire - 类型错误 : Cannot read property '$add' of undefined

AngularJs : event listener on http requests