在我的页面中,我在大写中收到一个用户名,我想大写。
问题在于,当我应用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;
}