如果要资本化的文本是Ionic3中的大写,则资本化不起作用



在我的页面中,我在大写中收到一个用户名,我想大写。
问题在于,当我应用text-transform: capitalize! Important;时,它不起作用。

另一方面,如果我收到的值是小写的,则该值可行。

有什么想法是为了使我的大写文字大写吗?

我的元素:

<ion-card-title text-capitalize>{{data.userName}}</ion-card-title>

page.html

<ion-card-title text-capitalize class="uname">{{data.userName}}</ion-card-title>

page.css

.uname{
    text-transform: lowercase !important;
}
.uname::first-letter{
    text-transform: uppercase !important;
}

最新更新