I am working on creating a polygon background for my menu, which needs to be responsive in design. Here is an example of what I am trying to achieve: example image.
Should I use JavaScript to listen for size changes and adjust the points for the polygon element, or is there a cleaner CSS implementation available? I will be using Bootstrap, and the menu should align about 50px to the left and right of the main container.
<div style="width: 1138px; height: 555px">
<img src="example-picture1.jpg"
</div>
<svg width="1300" height="200" id="main_menue_svg">
<polygon id="main_menue_polygon" points="0,0 33,33 0,66 1244,66 1211,33 1244,0 0,0"
style="fill:rgb(51, 76, 25);stroke:rgb(51, 76, 25);stroke-width:0;fill-rule:evenodd;" />
</svg>