fix css and js for success animation
This commit is contained in:
parent
1542a42156
commit
9c54c89fcf
|
@ -135,4 +135,38 @@ section#output {
|
|||
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;
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ Vue.component('copbox',{
|
|||
successOk(){
|
||||
this.isSuccess = true;
|
||||
this.$refs.element.addEventListener('animationend', () => {
|
||||
this.isFaded = false;
|
||||
this.isSuccess = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue