【发布时间】:2019-11-24 04:08:55
【问题描述】:
我正在使用 ionic4/angular,但有 2 个问题。我在单独的页面中创建了一个启动画面(动画徽标)。当我打开应用程序时,在启动画面(单独的页面)加载之前会出现一个白屏。我隐藏了启动画面。当我对此进行研究时,我发现它的发生是因为应用程序本身需要时间来加载。建议一种替代方法来实现同样的目标。
我的第二个问题是加载徽标时出现一条小线。部署在真实设备上时会出现此问题,但当我在模拟器和本地主机上运行时它是完美的。小线如下所示:
但不应该是这样的。
ion-content{
--background:#FFBF00;
}
img{
padding-bottom: 1px;
}
.tree {
left: 0;
right: 5%;
margin:0 auto;
top:50%;
transform:translateY(-50%);
width: 100%;
position: absolute;
}
.tree > div {
position: absolute;
height: 100%;
width: 100%;
background: #FFBF00;
top: 0;
left: 0;
-webkit-animation-name: hello;
-webkit-animation-duration: 5s;
-webkit-animation-fill-mode: forwards;
animation-name: hello;
animation-duration: 5s;
animation-fill-mode: forwards;
}
@keyframes hello {
0% {
height: 100%;
}
100% {
height: 0%;
}
}
@-webkit-keyframes hello {
0% {
height: 100%;
}
100% {
height: 0%;
}
}
<ion-content>
<div class="tree" text-center>
<div></div>
<img src="assets/logo.svg">
</div>
</ion-content>
【问题讨论】:
标签: html css angular ionic-framework