Is quite easy. Basically you start with a circle with a certain width and height, a full border-radius and a transition to it. Then on hover for example, you increase the width of that circle. Doing this will smootly transform that circle into a rectangle. If you dont manage to make it work, i`l create some examples for you.
Take a look at this(hover on the circle)
div { width: 50px; height: 50px; border: 3px solid green; border-radius: 30px; margin:0 auto; transition: .5s; } div:hover{ width: 200px; background-color: green; }
<div></div>
From here on you can modifiy it to fit your needs.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.