0
간단한 토스트 시스템을 만들었습니다. 나는 비 볼 (bottom: -50px; position: fixed;
) 블록이 있습니다클래스를 변경하여 애니메이션 슬라이드 다운
<div class="toast" ng-class="$root.peekToast.class" ng-bind="$root.peekToast.msg"></div>
그럼 내가 추가를 toast-show
토스트가 필요한 경우 ng-class
를 사용하여 클래스 (애니메이션) :
.ew-toast-show {
-webkit-animation: ew-toast-show 0.5s forwards;
-webkit-animation-delay: 0.5s;
animation: ew-toast-show 0.5s forwards;
animation-delay: 500ms;
}
@-webkit-keyframes ew-toast-show {
100% { bottom: 20px; }
}
@keyframes ew-toast-show {
100% { bottom: 20px; }
}
, 토스트가 될 준비가되어 있습니다 나는 toast-show
클래스를 대체 할 때 toast-hide
이라는 축배를 갖고 싶습니다.
나는 대신 -50px
을 사용하여 show
애니메이션 논리를 복제하려고 시도했습니다. 그것은 효과가 없었습니다. 그것은 그것을 숨기고 그것을 아래로 미끄러 뜨리기 전에 보여주었습니다.
올바른 방법은 무엇입니까?