如何在ionic4中使用SCSS和HTML中的样式?
我正在将源代码从ionic3迁移到ionic4。如何在ionic4中使用SCSS和HTML中的样式?,html,css,angular,ionic-framework,ionic4,Html,Css,Angular,Ionic Framework,Ionic4,我正在将源代码从ionic3迁移到ionic4。 html中文本中心的用法已随此错误而更改。 [DEPRECATED][CSS] Ionic CSS attributes are deprecated. Replace: '<p text-center>' With: '<p class="ion-text-center">' 只需在class属性中使用两个类名即可 <p class="txt_login ion-text-center" (click)="Lo
html中文本中心的用法已随此错误而更改。
[DEPRECATED][CSS] Ionic CSS attributes are deprecated.
Replace:
'<p text-center>'
With:
'<p class="ion-text-center">'
只需在class属性中使用两个类名即可
<p class="txt_login ion-text-center" (click)="Login()">LOGIN</p>
login
我试过了,但不起作用。字体大小显示得很大。@Hyonta,你的根元素的字体大小是多少,因为10.5 rem非常大。也许你应该使用较小的值,比如1.5 rem
.txt_login{
color:white;
font-size: 10.5rem;
}
<p class="txt_login ion-text-center" (click)="Login()">LOGIN</p>