如何将mdButton文本设置为小写?

时间:2015-11-16 04:13:28

标签: angular-material

here可以看出,mdButton将使用大写字母设置文本。如果我想制作小写怎么办?

4 个答案:

答案 0 :(得分:9)

使用css text-transform 编写自己的类,例如

.tolowercase {
    text-transform: lowercase;
}

.tocapitalize {
    text-transform: capitalize;
}

并将其应用于输入/按钮。

如果您希望整个系统中的htis行为覆盖您的CSS中的.md-button类,

 .md-button {    
    text-transform: capitalize !important;/*For Lower case use lowercase*/
}

答案 1 :(得分:0)

XML中的

android:textAllCaps="false"

编程:

 mbutton.setAllCaps(false);

答案 2 :(得分:0)

整洁。您还可以将引导类text-lowercase添加到按钮中以覆盖默认值。要在按钮中使用大写字母(每个单词都以大写字母开头),请确保以小写形式编写按钮名称,然后将引导类text-capitalize添加到按钮中。这样更容易。

答案 3 :(得分:0)

从CSS中的task undeployAfterCompleted() { group "kubernetes" description "Undeploy the liquibase update job after completion" def output = new ByteArrayOutputStream() commandLine "bash", "-c", "kubectl get po -n pbr | grep 'liquibase' | awk '{ print \$3 }'" while(!output.toString().equals('Completed')) { sleep(5 * 1000) println "Job has not completed yet." commandLine "bash", "-c", "kubectl get po -n pbr | grep 'liquibase' | awk '{ print \$3 }'" } tasks.undeploy.execute() } 删除文本转换:

md-button
相关问题