fix css and js for success animation

This commit is contained in:
edbrz9 2022-12-30 19:28:33 +01:00
parent 1542a42156
commit 9c54c89fcf
2 changed files with 35 additions and 1 deletions

View File

@ -136,3 +136,37 @@ section#output div.y2t-output {
margin-top: 40px;
margin-bottom: 40px;
}
div.y2t-output {
position: relative;
}
div.copied {
position: absolute;
background-color: var(--success);
color: white;
font-size: 1.2rem;
padding: 10px;
right: -15px;
top: -10px;
transform: rotate(10deg);
}
.success {
animation: fade-in 3s forwards;
}
@keyframes fade-in {
0% {
opacity: 0;
}
30% {
opacity: 1;
}
80% {
opacity: 1;
}
100% {
opacity: 0;
}
}

View File

@ -31,7 +31,7 @@ Vue.component('copbox',{
successOk(){
this.isSuccess = true;
this.$refs.element.addEventListener('animationend', () => {
this.isFaded = false;
this.isSuccess = false;
});
}
}