我试图缩放像元素的svg路径。但缩放对于div元素无法用于svg路径元素的情况正常工作。下面附上了我的代码。任何建议?如何缩放SVG路径
<style>
.two {
transition: all 2s ease-in-out 0.5s;
-webkit-transition: all 2s ease-in-out 0.5s;
}
#scale {
height: 150px;
width: 100px;
text-align: center;
margin: 0 auto;
}
#scale {
border: 1px blue solid;
}
.grow:hover {
transform: scale(2.0);
-ms-transform: scale(2.0);
-webkit-transform: scale(2.0);
}
</style>
<body>
<svg width="1350" height="900">
<path d="M 673 248.625 A 67.875 67.875 0 0 1 740.1841400272543 326.159552463664 L 673 316.5 A 0 0 1 0 0 673 316.5 z" id="scale" class="two grow"></path>
</svg>
</body>
也许你可以通过改变SVG视器扩展吗?例如。 http://jonibologna.com/svg-viewbox-and-viewport/#expandingviewport – ne1410s