Im trying to animate a button on my webpage which is a basically a timed animation that starts off at the top of the button and then eventually fills up the entire border of the button. I've attached an image as its hard to describe what I mean.
I'm sure that this can be done with Keyframes but I have no idea how. I've tried something like this to start:
@keyframes borderblueanim {
0% {border-color: #fff; }
100% {border-color: blue; }
}
@-webkit-keyframes borderblueanim {
0% {border-color: #fff; }
100% {border-color: blue; }
}
animation: borderblueanim 5s infinite;
-webkit-animation: borderblueanim 2s infinite;
But its not correct. Would appreciate any ideas and help.