如何将 mdButton 文本设置为小写?
How do I set mdButton text to lowercase?
从here可以看出,mdButton 会将您的文本设置为大写字母。如果我想变成小写怎么办?
使用 css text-transform 编写您自己的 class 例如,
.tolowercase {
text-transform: lowercase;
}
.tocapitalize {
text-transform: capitalize;
}
并将其应用于 input/button。
如果您希望整个系统都具有 htis 行为,请覆盖 css、
中的 .md 按钮 class
.md-button {
text-transform: capitalize !important;/*For Lower case use lowercase*/
}
在XML中:
android:textAllCaps="false"
以编程方式:
mbutton.setAllCaps(false);
整洁。您还可以将 bootstrap class text-lowercase
添加到您的按钮以覆盖默认值。要在您的按钮中使用大写字母(每个单词以大写字母开头),请确保您以小写形式书写您的按钮名称,然后将 bootstrap class text-capitalize
添加到您的按钮。那样更容易。
在 CSS 中删除 md-button
的文本转换:
md-button {
text-transform: none
}
从here可以看出,mdButton 会将您的文本设置为大写字母。如果我想变成小写怎么办?
使用 css text-transform 编写您自己的 class 例如,
.tolowercase {
text-transform: lowercase;
}
.tocapitalize {
text-transform: capitalize;
}
并将其应用于 input/button。
如果您希望整个系统都具有 htis 行为,请覆盖 css、
中的 .md 按钮 class .md-button {
text-transform: capitalize !important;/*For Lower case use lowercase*/
}
在XML中:
android:textAllCaps="false"
以编程方式:
mbutton.setAllCaps(false);
整洁。您还可以将 bootstrap class text-lowercase
添加到您的按钮以覆盖默认值。要在您的按钮中使用大写字母(每个单词以大写字母开头),请确保您以小写形式书写您的按钮名称,然后将 bootstrap class text-capitalize
添加到您的按钮。那样更容易。
在 CSS 中删除 md-button
的文本转换:
md-button {
text-transform: none
}