[英]How to use style in SCSS and HTML in ionic4?
I'm migrating source code from ionic3 to ionic4.我正在将源代码从 ionic3 迁移到 ionic4。
The usage of text-center in html has changed with this error. html 中 text-center 的用法已因此错误而改变。
[DEPRECATED][CSS] Ionic CSS attributes are deprecated.
Replace:
'<p text-center>'
With:
'<p class="ion-text-center">'
How do I write the following code in ionic4?如何在ionic4中编写以下代码?
Please help me.请帮我。
Writing for ionic3
为 ionic3 编写
html html
<p class="txt_login" text-center (click)="Login()">LOGIN</p>
scss scss
.txt_login{
color:white;
font-size: 10.5rem;
}
只需在类属性中使用两个类名
<p class="txt_login ion-text-center" (click)="Login()">LOGIN</p>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.