feat: refactor request

This commit is contained in:
vben
2024-06-02 20:50:51 +08:00
parent ce0c3834ed
commit f95cc80895
29 changed files with 1096 additions and 265 deletions

View File

@@ -0,0 +1,51 @@
$max-child: 5;
@for $i from 1 through $max-child {
* > .enter-x:nth-child(#{$i}) {
transform: translateX(50px);
}
* > .-enter-x:nth-child(#{$i}) {
transform: translateX(-50px);
}
* > .enter-x:nth-child(#{$i}),
* > .-enter-x:nth-child(#{$i}) {
// z-index: 10 - $i;
opacity: 0;
animation: enter-x-animation 0.3s ease-in-out 0.2s;
animation-delay: 0.1s * $i;
animation-fill-mode: forwards;
}
* > .enter-y:nth-child(#{$i}) {
transform: translateY(50px);
}
* > .-enter-y:nth-child(#{$i}) {
transform: translateY(-50px);
}
* > .enter-y:nth-child(#{$i}),
* > .-enter-y:nth-child(#{$i}) {
// z-index: 10 - $i;
opacity: 0;
animation: enter-y-animation 0.3s ease-in-out 0.2s;
animation-delay: 0.1s * $i;
animation-fill-mode: forwards;
}
}
@keyframes enter-x-animation {
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes enter-y-animation {
to {
opacity: 1;
transform: translateY(0);
}
}