I'm trying to create an infinite animation that sequentially changes colors of border sides (travelling around). I cant figure out the unwanted delays / jumps at the beginning of the each repetition.
#neki {
padding:10px;
border: 6px solid #dcdcdc;
animation: example 1s infinite;
}
@keyframes example {
0% {
border-color: #dcdcdc;
}
25% {
border-left-color: red;
}
50% {
border-top-color: red;
}
75% {
border-right-color: red;
}
100% {
border-bottom-color: red;
}
}
<br>
<span id="neki">awdawdawdwdawda</span>
#neki {
padding: 10px;
border: 6px solid #dcdcdc;
animation: example 1s infinite;
}
@keyframes example {
0%,
100% {
border-top-color: red;
border-right-color: #dcdcdc;
}
25% {
border-right-color: red;
border-bottom-color: #dcdcdc;
}
50% {
border-bottom-color: red;
border-left-color: #dcdcdc;
}
75% {
border-left-color: red;
border-top-color: #dcdcdc;
}
}
<br />
<span id="neki">awdawdawdwdawda</span>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With