Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

in which case we use '%' as coordinate of point in svg?

$
0
0

I found using percentage (%) instead of numerical coordinate more efficient. But it seems does not support points' coordinate in case of path or polygon.

As shown in the code below, the rectangle is created using '%' the points of polygon.

<svg height="100" width="100"><polygon points="'50%','10%''10%','90%''90%','80%'" style="fill:lime;stroke:purple;stroke-width:1" /><rect width="90%" height="90%" x= "10%" style="fill:violet; stroke: red; fill-opacity: 0.5"/></svg>

it should be like this

<svg height="100" width="100"><polygon points="50,10 10,90 90,80" style="fill:lime;stroke:purple;stroke-width:1" /><rect width="90%" height="90%" x= "10%" style="fill:violet; stroke: red; fill-opacity: 0.5"/></svg>

which works normally. Is there any solutions for this?


Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>