【发布时间】:2021-09-30 09:57:51
【问题描述】:
我正在创建 ionic 4 angular 应用程序,并使用 ion-label 打印一些文本。我遇到了 ion-label 的问题,我将 ion-label 分配到中心但没有工作。使用了哪个 css 或 ionic 预定义 css?在我的 css 代码下面给出...
.User_Label_Section {
position: fixed;
display: flex;
justify-content: center;
margin-top: 107px;
}
.user_Name {
display: flex;
justify-content: center;
width: 200px;
}
<ion-row class="User_Label_Section">
<ion-col text-center>
<ion-label class="user_Name">ABCDEFG</ion-label>
</ion-col>
</ion-row>
【问题讨论】:
-
要垂直居中吗?
-
先生,不是垂直居中,只有水平居中。
-
我检查了它似乎已经以 .user_Name 为中心,如果您需要整个身体的中心,请告诉我。