0

I am experimenting with a navigation bar and currently using a clip-path: polygon for my links. Ideally I would want to round out my top-left corner. I've been searching for a minute, but couldn't come up with anything that works. Any ideas?

Code below:

.menu {
    width: 100%;
    float: right;
    height: 50px;
    clip-path: polygon(5% 0, 100% 0%, 100% 100%, 0% 100%);
    background-color: #1A2434;
}
<div class = "menu"></div>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415

1 Answers1

0

I did come up with a solution ,which is not ideal, but it works :p

<svg width="1440" height="150" xmlns="http://www.w3.org/2000/svg">
 <g>
  <title>Layer 1</title>
  <rect fill="#000" x="104.99999" y="0" width="614.00001" height="150" id="svg_1" rx="55" stroke="#000"/>
  <rect fill="#000" x="150" width="1290" height="150" id="svg_8" stroke="#000"/>
  <path stroke="#000" id="svg_3" d="m0,150l118.68751,-131.00001l395.62505,0l118.68747,131.00001l-633.00002,0z" fill="#000"/>
 </g>

</svg>
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 19 '21 at 18:45