Skip to content

FabButton

wenbobao edited this page Oct 12, 2017 · 1 revision

[ion-fab] FABs (Floating Action Buttons) 浮动操作按钮是标准的material design设计组件。它们被塑造成代表一种促进行动的圆圈。当按下时,它可能包含更多的相关动作。FABs顾名思义,就是在一个固定的位置上漂浮在内容上。这并没有完全实现<button ion-fab>Button</button>,但它必须包裹在<ion-fab>组件里面,就像这样:

<ion-content>
 <!-- Real floating action button, fixed. It will not scroll with the content -->
 <ion-fab>
   <button ion-fab>Button</button>
 </ion-fab>

 <!-- Button shaped as a circle that just like a normal button scrolls with the content -->
 <button ion-fab>Button</button>
</ion-content>

如果这个按钮不是用<ion-fab>包裹的,那么它就是一个普通的button,跟随屏幕滚动。

用法

  <!-- Colors -->
  <ion-fab>
    <button ion-fab color="primary">Button</button>
  </ion-fab>

  <!-- Mini -->
  <ion-fab>
    <button ion-fab mini>Small</button>
  </ion-fab>

属性

属性 描述
mini 制作一个尺寸缩小的fab按钮。

Sass Variables

查询地址

Clone this wiki locally