https://i.stack.imgur.com/io6m0.jpg
I'm in the process of trying to create two shapes using CSS. I've been able to almost achieve the first shape on the left, but it extends out too far.
As for the second shape, I'm having difficulties creating it altogether.
Is there a way to replicate these shapes without relying on Psuedo elements or using just one div?
The end goal is to utilize CSS animation to transform the initial shape into the second one, ruling out SVG as an option.
The div
should begin as shape one and smoothly transition into shape two. However, I'm encountering issues with the bulge protruding too much using my current method.
HTML
<div id="one"></div>
<div id="two"></div>
CSS
div {
width: 80px;
height: 80px;
background: black;
margin: 60px;
position: relative;
}
#one:before {
content: "";
display: block;
position: absolute;
border-radius: 55%;
width: 80px;
height: 80px;
background: black;
left: 0;
top: -34px;
}