In my website I have a div in which I have given border radius 100%. I want an animation, when I hover on the circle div its border should fill up 100% with animation. I am new in css3 and jquery. How can I do that? Thanks
<div class="circle"></div>
I have tried this, but not working
.circle {
position: relative;
overflow: hidden;
width: 120px;
height: 120px;
border-radius: 50%;
background: #E94E3D;
box-shadow: 60px -60px 0 2px #e94e3d, -60px -60px 0 2px #e94e3d, -60px 60px 0 2px #e94e3d, 60px 60px 0 2px #e94e3d, 0 0 0 2px #e94e3d;
}
.circle .text {
position: absolute;
top: 38px;
left: 30px;
width: 60px;
color: #fff;
text-align: center;
text-transform: uppercase;
font: 18px sans-serif;
transition: opacity .2s ease;
}
.circle:hover {
animation: border .4s ease 1 forwards;
cursor: none;
}
@keyframes border {
0% {
box-shadow: 60px -60px 0 2px #e94e3d, -60px -60px 0 2px #e94e3d, -60px 60px 0 2px #e94e3d, 60px 60px 0 2px #e94e3d, 0 0 0 2px #e94e3d;
}
25% {
box-shadow: 0 -125px 0 2px #e94e3d, -60px -60px 0 2px #e94e3d, -60px 60px 0 2px #e94e3d, 60px 60px 0 2px #e94e3d, 0 0 0 2px #ffffff;
}
50% {
box-shadow: 0 -125px 0 2px #e94e3d, -125px 0px 0 2px #e94e3d, -60px 60px 0 2px #e94e3d, 60px 60px 0 2px #e94e3d, 0 0 0 2px #ffffff;
}
75% {
box-shadow: 0 -125px 0 2px #e94e3d, -125px 0px 0 2px #e94e3d, 0px 125px 0 2px #e94e3d, 60px 60px 0 2px #e94e3d, 0 0 0 2px #ffffff;
}
100% {
box-shadow: 0 -125px 0 2px #e94e3d, -125px 0px 0 2px #e94e3d, 0px 125px 0 2px #e94e3d, 120px 40px 0 2px #e94e3d, 0 0 0 2px #ffffff;
}
}