I have been going through how different shapes can be drawn by css. I have encountered the following css code which draws a small arrow shape:
#curvedarrow {
position: relative;
width: 0;
height: 0;
border-top: 9px solid transparent;
border-right: 9px solid red;
-webkit-transform: rotate(10deg);
-moz-transform: rotate(10deg);
-ms-transform: rotate(10deg);
-o-transform: rotate(10deg);
}
#curvedarrow:after {
content: "";
position: absolute;
border: 0 solid transparent;
border-top: 3px solid red;
border-radius: 20px 0 0 0;
top: -12px;
left: -9px;
width: 12px;
height: 12px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
}
I completely understand how the tip of the arrow is drawn as I hide the tail (arrow:after) and this post really helped me a lot to understand most of the shapes drawn.
Yet I am stuck how the border is used to draw the tail. (I hid the tip by setting it transparent). Here is my jsfiddle also.
I see that he set only left-top corner border radius by border-radius: 20px 0 0 0;
, but why the end of the left side of that tail finishes getting smaller but the right side is just like a cut?
I thought that, okay only left-top side corner is drawn(when border-radius takes 4 values, first one is the left-top then top-right etc etc.. ref), so if I add right-top side, it should double the length of the shape yet getting the volume decreased. My second statement is correct, but the length does not change at all. jsfiddle