【发布时间】:2018-12-27 11:26:03
【问题描述】:
我想在组件打开的时候做一个动画或者做一个淡入淡出。
这是代码
这是 HTML
<div *ngIf="showMePartially" class="container">
<div class="body-container">
</div>
</div>
这是CSS
.container {
position: fixed;
z-index: 1;
padding-top: 100px;
transition: opacity 0.5s ease-in;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.4);
transition: 3s;
}
.body-container {
width: calc(100% - 73em);
position: relative;
left: 70em;
top: 7.5em;
background: white;
height: calc(100% - 18em);
border-radius: 4px;
padding-left: 11px;
transition: opacity 0.5s ease-in;
animation-direction: normal;
}
【问题讨论】:
-
我会给出答案
-
没有解决我的问题