问题描述
在我的 ionic v2 应用程序中是一个按钮,无论我输入哪个文本,它总是大写.我不想添加 css-utilities,因为我混合了大小写单词.
In my ionic v2 app is a button, no matter which text I type in, it's always capitalized. I don't want to add css-utilities, because i have mixed lower and upper case words.
这是我的代码:
<button ion-button large block color="danger" (click)="openPage($event, 0)">
This is my test Text.
</button>
我试图从按钮标记中删除所有属性,但没有奏效.有什么建议吗?
I've tried to remove all properties from the button tag, but that did not worked. Any suggestions?
推荐答案
似乎按钮的 text-transform 在 CSS 中设置为 uppercase>.将以下 CSS 添加到您的按钮:text-transform: none;
以覆盖 CSS 属性集.
It seems the button has text-transform set to uppercase in CSS. Add the following CSS to your button: text-transform: none;
to override the CSS property set.
你的代码变成这样:
<button ion-button large block color="danger" style="text-transform: none;" (click)="openPage($event, 0)">
This is my test Text.
</button>
有关 text-transform 属性的详细信息CSS text-transform 属性
For more information on the text-transform propertyCSS text-transform Property
这篇关于大写的 Ionic v2 按钮文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!