Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これが私のsvgです
<svg id="svgMain" align="center" width="500" height="500"></svg>
ただし、中央に揃えられていません。画面の中央に揃える方法。
CSSを試してください:
#svgMain {margin-left:auto; margin-right:auto; display:block;}
それを要素に含めます。
<div text-align="center"> <svg id="svgMain" align="center" width="500" height="500"></svg> </div>
これは機能するはずです。