【发布时间】:2019-05-09 17:14:44
【问题描述】:
我在 Angular 中的 index.html 中创建了一个加载屏幕,例如:
<app-root>
<div class="app-loading">
<svg class="logo" viewBox="0 0 100 100" >
</svg>
</div>
</app-root>
并应用了一些样式。但是页面加载后,svg 就突然消失了。
<style type="text/css">
body, html {
height: 100%;
}
.app-loading {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.app-loading .logo {
height: 100px;
width: 100px;
transform-origin: center center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
</style>
当它消失时,我如何进行和缓出过渡?
【问题讨论】:
-
@dota2pro 我也添加了