SVG包含<g id="svg_1" class="svg_16 deg_90 cat_top stag" transform="translate(168,27)">
<path id="path3482" stroke="null" d="M163.4569320678711,77.09903907775879 L163.53585815429688,57.430060029029846 L169.3652572631836,57.448439955711365 C172.57144165039062,57.45854997634888 176.23014068603516,57.605380058288574 177.49568939208984,57.77471995353699 C180.63410186767578,58.194659948349 239.44471740722656,73.29018974304199 239.9712677001953,73.8109302520752 C240.62197875976562,74.4544506072998 240.55477905273438,79.61404991149902 239.8870391845703,80.27433967590332 C239.3158416748047,80.83922958374023 181.77594757080078,95.68032836914062 178.26336669921875,96.16965103149414 C177.0821533203125,96.33391952514648 173.2498779296875,96.53572082519531 169.74712371826172,96.61808013916016 L163.3785629272461,96.76786041259766 L163.45748901367188,77.09888076782227 L163.4569091796875,77.09903907775879 L163.4569320678711,77.09903907775879 z" fill="#e8e8e8">
</g>
<g id="svg_2" class="svg_14 deg_180 cat_top stag" stroke-opacity="1">
<path id="path3408" stroke="null" fill="#d5d5d5" d="M333.94000244140625,178.6445770263672 C333.83778381347656,178.53108978271484 333.75416564941406,169.477783203125 333.75416564941406,158.52658081054688 L333.75416564941406,138.61399841308594 L373.75416564941406,138.61399841308594 L413.75416564941406,138.61399841308594 L413.75416564941406,158.73200225830078 L413.75416564941406,178.8499984741211 L373.94017028808594,178.8499984741211 C352.04217529296875,178.8499984741211 334.04217529296875,178.75717163085938 333.94017028808594,178.64366149902344 L333.940002441....50531768798828 L334.86944580078125,143.56642150878906 L373.89344787597656,143.56642150878906 L412.9174499511719,143.56642150878906 L412.9174499511719,141.70929718017578 L412.91815185546875,141.7094268798828 zM340.6531524658203,139.00318908691406 C339.46495056152344,138.9451675415039 337.520751953125,138.9451675415039 336.3325500488281,139.00318908691406 S336.11651611328125,139.10868072509766 338.4928436279297,139.10868072509766 S341.84124755859375,139.06121063232422 340.6531524658203,139.00318908691406 z">
</g>
<svg>
的多个形状我希望使用svg编辑器(https://github.com/SVG-Edit/svgedit)获取特定的图像宽度和高度。
示例图片:
{{1}}
我想要svg_1宽度高度。
答案 0 :(得分:0)
var bbox = $("#svg_1").getBBox();
你的bbox对象如下所示:
SVGRect {x: 119, y: 138, width: 358, height: 308}