Answers for "how to set svg height width in html"

CSS
1

css svg width 100%

<svg height="100%" width="100%" viewBox="0 0 100 100"  preserveAspectRatio="none">
   <path d="M0 0 L100 0 L50 100 Z" />
</svg>
Posted by: Guest on August-31-2020
2

html scale svg

/* responsive svg */
/* NOTE: remove default width and height and replace it with values in viewbox */
<svg version="1.1" viewBox="0 0 500 500">
	<circle fill="#F7941E" stroke="#231F20" stroke-width="10" 
	cx="250" cy="250" r="200" opacity="0.6" />
</svg>
Posted by: Guest on May-20-2020

Code answers related to "how to set svg height width in html"

Browse Popular Code Answers by Language