在视口中居中SVG

时间:2020-10-22 10:20:27

标签: css

我有以下SVG:

<svg width="15px" height="18px" viewBox="0 0 15 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>Shape</title>
    <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="question-controls" transform="translate(-52.000000, -1.000000)" fill="#72758D" fill-rule="nonzero">
            <path d="M62,1 L54,1 C52.9,1 52,1.9 52,3 L52,13 L54,13 L54,3 L62,3 L62,1 Z M65,5 L58,5 C56.9,5 56,5.9 56,7 L56,17 C56,18.1 56.9,19 58,19 L65,19 C66.1,19 67,18.1 67,17 L67,7 C67,5.9 66.1,5 65,5 Z M65,17 L58,17 L58,7 L65,7 L65,17 Z" id="Shape"></path>
        </g>
    </g>
</svg>

它是Material IO中的“重复图标”。 https://material.io/resources/icons/?search=duplicat&icon=content_copy&style=baseline

但是,您可以看到它不在其视口的中心。 enter image description here

我尝试提供与viewBox相同的viewBox="0 0 100 100"值,但收效甚微。

0 个答案:

没有答案
相关问题