2017-06-29 109 views

回答

1

使用md-invertmd-switch標籤,它適用於1.1.2版及更高版本。

UPDATE

對於版本1.1.2之前, 嘗試使用下面的CSS。您可以使用ID標籤將這些樣式應用於特定的md-switch

md-switch#switch1 { 
    position: relative; 
} 

#switch1 div.md-container { 
    position: absolute; 
    margin-left: 10%; 
    float: right; 
} 

#switch1 div.md-label { 
    float: left; 
    position: absolute; 
    margin-left: 1%; 
} 

HTML:

<md-switch md-no-ink ng-model="hasInk" aria-label="No Ink Effects" id="switch1"> 
    Switch 1 
</md-switch> 

demo

+0

是的,這是在doc。但由於某種原因,它根本無法工作。 –

+0

您使用的是哪個版本的材料? – Nehal

+0

我正在使用verson 1.1.0 –