animations tweak

This commit is contained in:
Alberto Xamin 2020-11-20 23:21:52 +01:00
parent 79f363a5a0
commit 31508dbb94
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
4 changed files with 80 additions and 32 deletions

View File

@ -139,4 +139,41 @@ h1,h2,h3,h4,p,span{
opacity: 0; opacity: 0;
transform: translateY(30px); transform: translateY(30px);
} }
.fade-enter-active, .fade-leave-active {
transition: opacity 0.25s ease-out;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
.bounce-enter-active, .bounce-leave-active {
animation: bounce-in .5s;
}
.fade-enter, .bounce-leave-to {
animation: bounce-out .5s;
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(0);
}
}
</style> </style>

View File

@ -45,4 +45,13 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.card {
width: 72pt;
min-width:72pt;
height: 120pt;
}
.card:hover {
transform: translate(0, -5px) scale(1.05, 1.05);
}
</style> </style>

View File

@ -14,7 +14,9 @@
<player/> <player/>
</div> </div>
<chat/> <chat/>
<transition name="bounce">
<Chooser v-if="showChooser" text="Scegli il tuo personaggio" :cards="availableCharacters" :select="setCharacter"/> <Chooser v-if="showChooser" text="Scegli il tuo personaggio" :cards="availableCharacters" :select="setCharacter"/>
</transition>
</div> </div>
</template> </template>