How do I make SVG fit to the parent container 100?

How do I make SVG fit to the parent container 100?
Answer
4 Answers
  1. Add width=”100%” and height=”100%” attributes.
  2. Add preserveAspectRatio 1 with value of none 2 . none do not force uniform scaling. Scale the graphic content of the given element non-uniformly if necessary such that the element’s bounding box exactly matches the viewport rectangle.
 

Tìm kiếm

Back
Top