Selector:<material-button>css
平面或凸起按钮,带有可选的波纹效果。git
Attributes:github
如下属性一般与<material-button>一块儿使用:web
Styling:app
指定按钮颜色的首选方法是使用mixins:字体
/* Make #myButton green with yellow text */ @include button-background-color('#myButton', green); @include button-color('#myButton', yellow);
将mixin用于颜色的优势是它们不会覆盖禁用的状态颜色。您也能够像使用普通DOM元素同样使用CSS设置按钮的样式,尽管这也会影响禁用状态:google
/* Make #myButton green with yellow text */ #myButton { background: green; color: yellow; }
默认状况下,纹波与25%不透明度下的前景颜色相同。 要自定义颜色,请使用material-ripple选择器:spa
/* Make #myButton use a blue ripple instead of foreground color */ #myButton material-ripple { color: blue; }
纹波的不透明度不能经过CSS自定义。设计
也能够看看:code
例子:
其余资源:
Inputs:
Outputs:
Selector: <material-fab>
材料FAB是一个浮动操做按钮。 它是圆的,而且与MaterialButton的行为大体相同。
它能够是扁平的或凸起的。 凸起的按钮采用阴影设计。
Styling:
指定FAB颜色的首选方法是使用mixins:
/* Make #myButton green with yellow icon */ @include button-background-color('#myButton', green); @include icon-button-color('#myButton', yellow);
将mixin用于颜色的优势是它们不会覆盖禁用的状态颜色。您也能够像使用普通DOM元素同样使用CSS设置FAB样式,尽管这也会影响禁用状态:
/* Make #myButton green with yellow icon */ #myButton { background: green; color: yellow; }
默认状况下,纹波与25%不透明度下的前景颜色相同。 您能够使用此选择器自定义颜色:
/* Make #myButton use a blue ripple instead of foreground color */ #myButton material-ripple { color: blue; }
纹波的不透明度不能经过CSS自定义。
Inputs:
Outputs: