I have design for webpage where everything is made by non-rectangular shapes, polygons, sharp edges… I consider which technique is better to use, clip path with css or with borders? I am asking because i saw on other websites that they are using border technique for shapes.
Why not simple clip path with css like this?
<pre>
.triangle {
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
</pre>
Instead of this:
<pre>
.triangle {
width:0;
border-bottom:solid 50px black;
border-right:solid 30px transparent;
border-left:solid 30px transparent;
}
</pre>