コンテナにフィットするようにviewBoxでsvgを使用しています。コンテナのサイズを変更するとsvgサークルとテキストのサイズが変更され、コンテナにフィットしますが、コンテナのサイズを変更するとfontSizeのサイズを変更したくありません。私は多くを検索しましたが、貴重な提案は見つかりませんでした。svg viewboxはテキストfontSizeのサイズを変更しないでください。
divのサイズを変更する必要があります。また、サークルのサイズを変更する必要がありますが、テキストのサイズを変更しないでください。テキストもサークルと一緒に移動する必要があります。
ご了承ください。
次は私がここに私のアプリケーションで
<div id="container">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920 620" preserveAspectRatio="none" style="overflow: hidden; position: relative;">
<circle cx="100" cy="100" r="100" fill="green"></circle>
<text x="100" y="100" text-anchor="middle" font="18px "Arial"" 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;">
<tspan dy="5.828125" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Circle</tspan>
</text>
</svg>
</div>
を使用していSVGはDemo
注です:申し訳ありませんjsFiddle
[このデモ](http://stackoverflow.com/questions/には影響しません10473328/how-to-draw-non-scalable-circle-in-svg-with-javascript)私は、選択された要素のトランスフォームを動的に変更できるJavaScriptを提供し、ページのズームに合わせてスケールを独立に保ちます。 – Phrogz