добавление анимации

This commit is contained in:
Denzel committed 2025-01-23 08:31:30 +03:00
1 parent 0cdd975706
commit 9bb97361ad
2 files changed
+95

No files matched your search

@@ -42,6 +42,7 @@
</h3>
<v-row>
<div class="v-col align-self-start">
<VoteAnimation v-if="!question.file" />
<v-img
:src="question.file"
class="cursor-pointer"
@@ -145,9 +146,11 @@ import {axiosApiInstance, spravURL} from "@/utils/axios-api";
import {computed, ref} from "vue";
import {useAccountStore} from "@/store/AccountStore";
import {checkremote} from "@/utils/universal_functions";
import VoteAnimation from "@/components/vote/VoteAnimation.vue";
export default {
name: 'CurrentVote',
components: {VoteAnimation},
methods: {
checkremote,
spravURL() {
@@ -0,0 +1,92 @@
<template>
<v-container class="d-flex flex-column align-center">
<div class="animation-container">
<div class="ballot">
<span class="ballot-text">Голос</span>
</div>
<div class="urn">
<div class="slot"></div>
</div>
</div>
</v-container>
</template>
<script>
export default {
setup() {
return {};
},
};
</script>
<style scoped>
.animation-container {
position: relative;
width: 200px;
height: 300px;
display: flex;
justify-content: center;
align-items: flex-end;
overflow: hidden;
}
.ballot {
position: absolute;
width: 60px;
height: 40px;
background-color: #004D40;
border-radius: 4px;
color: #fff;
font-size: 14px;
font-weight: bold;
text-align: center;
line-height: 40px;
animation: dropBallot 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.ballot-text {
display: block;
}
.urn {
position: absolute;
bottom: 0;
width: 120px;
height: 80px;
background-color: #546E7A;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
display: flex;
justify-content: center;
align-items: flex-start;
}
.slot {
width: 60px;
height: 10px;
background-color: #455A64;
border-radius: 5px;
}
@keyframes dropBallot {
0% {
top: -50px;
transform: rotate(0deg);
opacity: 1;
}
40% {
transform: rotate(15deg);
}
60% {
top: 220px;
transform: rotate(-10deg);
opacity: 1;
}
100% {
transform: rotate(0deg);
opacity: 0.8;
}
}
</style>