Rounded corner only on one side of svg

后端 未结 4 832
面向向阳花
面向向阳花 2020-12-16 10:01

I am trying to implement a bar chart like diagram. I have the following html element



        
4条回答
  •  [愿得一人]
    2020-12-16 10:59

    As commented by Robert Longson you need to convert your rect element to a path element to control the rounded corners.

    In the following example, I used a cubic bezier curve with the Q command to make the top left rounded corner (Q1 1 5 1 in the d attribute):

    svg{
      height:90vh;
      width:auto;
      }
    
      
    

提交回复
热议问题