I'm trying to make a link flash when the user loads the site. However, the animation doesn't work in Vue.
I tried the same code without Vue in a seperate file and it worked just fine.
This is the element which should flash. (The class 'flash' shows up in the DOM. It seems like it's not a problem with my JS)
<a href="/test/" :class="isFlashing ? 'flash' : ''">
<h2>Test</h2>
</a>
The animation in CSS:
.flash {
-webkit-animation: flashing 0.5s infinite;
animation: flashing 0.5s infinite;
}
@-webkit-keyframes flashing {
0% {
color: white;
}
50% {
color: black;
}
100% {
color: white;
}
}
@keyframes flashing {
0% {
color: white;
}
50% {
color: black;
}
100% {
color: white;
}
}
And the style for the h2 element itself:
h2 {
position: absolute;
top: 93%;
color: white;
margin-left: 7%;
}
I expected the link to flash infinitely, but nothing happened. It just stays white. As said before, the animations works when Vue is not loaded.