I'm trying to make this wedge shape has 45 degree angles at both ends.
As the size of its containing div changes, or the page is zoomed, that angle changes:
Here's my (abbreviated) code:
<div class="relative">
<svg class="h-16p top-0 left-0 absolute w-full fill-current" viewBox="0 0 100 4" preserveAspectRatio="none">
<polygon points="0,0 100,0 95,5 5,5" />
</svg>
</div>
I'm using tailwindCSS - for those not familiar those classes translate to:
position: absolute;
width: 100%;
fill: currentColor;
height: 16px;
top: 0px;
left: 0px;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…