I attempted to create an interesting effect when hovering over a circular div, but I struggled to figure out how to fill it in with the same round shape.
Currently, the fill is in a square shape, but I am looking to have it match the shape of the div (which is round in this instance). Is there a way to achieve this using CSS?
.circle {
height: 50px;
width: 50px;
margin: 35px;
border: 3px solid blue;
background-image: linear-gradient(blue, blue);
background-repeat: no-repeat;
transition: background-size .5s, color .5s;
background-size: 0 0;
background-position: 50% 50%;
border-radius: 30px;
}
.circle:hover {
background-size: 100% 100%;
color: blue;
}
<div class="circle"></div>