小编San*_*th 的帖子

如何缩放SVG路径

我试图像元素一样缩放 svg 路径。但是缩放对于 div 元素不起作用,不适用于 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>
Run Code Online (Sandbox Code Playgroud)
<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 …
Run Code Online (Sandbox Code Playgroud)

html javascript css svg

11
推荐指数
2
解决办法
5万
查看次数

标签 统计

css ×1

html ×1

javascript ×1

svg ×1