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: