Answer the question
In order to leave comments, you need to log in
Correct positioning of svg polygon?
Hello!
I created a svg polygon triangle, now the question arose, how to correctly drop it in the center of the image?
<img src="https://image.freepik.com/free-photo/shiny-night-city_1127-8.jpg" alt="">
<svg>
<defs>
<clipPath id="clipping">
<polygon points="0 0,300 0,150 300">
</polygon>
</clipPath>
</defs>
</svg>
img
{
max-width: 100%;
clip-path: url(#clipping);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question