Note that there are some explanatory texts on larger screens.

plurals
  1. POsvg viewbox should not resize the text fontSize?
    primarykey
    data
    text
    <p>I'm using svg with viewBox for fit to the container its working fine ,when i resize the container the svg circle and text are resizing and fit to container but i don't want to resize the text fontSize when i resize the container.I searched a lot but didn't find any valuable suggestions.</p> <p>I need to resize div and svg circle should resize but text should not resize the font size and also text should move to along with the circle.</p> <p>Any suggestions should be appreciated.</p> <p>The following is the SVG i'm using in my application</p> <pre><code>&lt;div id="container"&gt; &lt;svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920 620" preserveAspectRatio="none" style="overflow: hidden; position: relative;"&gt; &lt;circle cx="100" cy="100" r="100" fill="green"&gt;&lt;/circle&gt; &lt;text x="100" y="100" text-anchor="middle" font="18px &amp;quot;Arial&amp;quot;" stroke="none" fill="#000000" font-size="20px" font-style="italic" font-weight="800" font-family="Times New Roman" opacity="1.0" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-style: italic; font-variant: normal; font-weight: 800; font-size: 18px; line-height: normal; font-family: 'Times New Roman'; opacity: 1;"&gt; &lt;tspan dy="5.828125" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"&gt;Circle&lt;/tspan&gt; &lt;/text&gt; &lt;/svg&gt; &lt;/div&gt; </code></pre> <p>Here is the <a href="http://jsfiddle.net/d4Vs4/1" rel="noreferrer"><strong>Demo</strong></a></p> <p><strong>Note</strong>: Resize the jsFiddle</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload