Answers for "css increase svg size"

CSS
0

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
0

how to rescale size of an svg image

.SvgImage img{ width:80%; }
Posted by: Guest on August-17-2021
0

svg auto size

// Javascript to run after document load
var svg = document.getElementsByTagName("svg")[0];
var bbox = svg.getBBox();
svg.setAttribute("width", bbox.width + "px");
svg.setAttribute("height", bbox.height + "px");
svg.setAttribute("viewBox", `${bbox.x} ${bbox.y} ${bbox.width} ${bbox.height}`);
Posted by: Guest on March-19-2021

Browse Popular Code Answers by Language