Search code examples
svgresizeviewbox

Skip one element from viewBox SVG


I have an SVG with several group elements. I need to apply the viewBox and preserveaspectratio to only one group in that. Is there any way to apply that to one group? or Is there any way to skip some <g> elements from taking the viewBox and preserveaspectratio from the SVG?


Solution

  • No. The scaling of the SVG based on the viewBox applies to the entire SVG. There is no way to exempt some of the contents from being affected.