SVG 图动画 HTML

问题描述 投票:0回答:1

我想为 svg 图形制作动画。我想为条形图制作动画,以便条形从 0 开始并在 4 秒时达到高度,我似乎无法弄清楚。将其想象为一个加载条,但在图中是水平的。我把图中的整个代码放在这里,也许你可以帮我弄清楚。

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1350.8 841"><metadata><c2pa:manifest xmlns:c2pa="http://c2pa.org/manifest">AAA0RGp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAADQeanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46dXVpZDo3MGRmNTZkZS0zNWFhLTQ3ZjMtOTk3Yi03ZGJjM2ExNzA1NjgAAAABtGp1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAANdqdW1iAAAAJmp1bWRjYm9yABEAEIAAAKoAOJtxA2MycGEuYWN0aW9ucwAAAACpY2JvcqFnYWN0aW9uc4GjZmFjdGlvbmtjMnBhLmVkaXRlZG1zb2Z0d2FyZUFnZW50bUFkb2JlIEZpcmVmbHlxZGlnaXRhbFNvdXJjZVR5cGV4U2h0dHA6Ly9jdi5pcHRjLm9yZy9uZXdzY29kZXMvZGlnaXRhbHNvdXJjZXR5cGUvY29tcG9zaXRlV2l0aFRyYWluZWRBbGdvcml0aG1pY01lZGlhAAAArGp1bWIAAAAoanVtZGNib3IAEQAQgAAAqgA4m3EDYzJwYS5oYXNoLmRhdGEAAAAAfGNib3KlamV4Y2x1c2lvbnOBomVzdGFydBi1Zmxlbmd0aBlFsGRuYW1lbmp1bWJmIG1hbmlmZXN0Y2FsZ2ZzaGEyNTZkaGFzaFggsjBVEM+Icahtv3Inaao+fC7rjndEmtcSmYCA3hx9LhZjcGFkSQAAAAAAAAAAAAAAAgtqdW1iAAAAJGp1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0AAAAB32Nib3KoaGRjO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w2mM9FQ6OdNQbpUWJBKOYrqCGO/E7bDFSQQYE7mPy8P3cXdlEIDa7mhlA9pE8KJdQlOcTjpU5z638bVVOJPgm1zxlGG5v3FHRaPGGDXHWarY/gDLzBmVcLUbLw04O138HRv+qwC3QOmRx0JDU9xcUWejRaxk6V260ebMi0k+AAzjudt</c2pa:manifest></metadata>
  <defs>
    <style>
      .cls-1 {
        fill: #3c3c3c;
      }

      .cls-2 {
        fill: #cacbce;
      }

      .cls-3 {
        fill: #9b999b;
      }
    </style>
  </defs>
  <!-- Generator: Adobe Illustrator 28.7.1, SVG Export Plug-In . SVG Version: 1.2.0 Build 142)  -->
  <g>
    <g id="diagramm">
      <g id="Diagramm">
        <g>
          <path class="cls-1" d="M157.1,530.5c-2,0-4-.9-5.4-2.6-2.4-3-1.9-7.3,1-9.7l197.4-159.3,46.6,58.8,201.8-165c3-2.4,7.3-2,9.7,1s2,7.3-1,9.7l-212.7,173.9-46.7-58.9-186.5,150.6c-1.3,1-2.8,1.5-4.3,1.5h0Z"/>
          <path class="cls-1" d="M603,336.2c-3.8,0-6.9-3.1-6.9-6.9v-66.7h-65.8c-3.8,0-6.9-3.1-6.9-6.9s3.1-6.9,6.9-6.9h79.7v80.6c0,3.8-3.1,6.9-6.9,6.9h0Z"/>
        </g>
        <g id="Diagramm_3">
          <g id="_x31_">
            <rect class="cls-3" x="194.9" y="535.2" width="75.1" height="115.3"/>
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s" 
        repeatCount="1" />
          </g>
          <g id="_x32_">
            <rect class="cls-2" x="298.6" y="451.3" width="75.1" height="198.8"/>
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s" 
        repeatCount="1" />
          </g>
          <g id="_x33_">
            <rect class="cls-3" x="402.2" y="464.5" width="75.1" height="185.6"/>
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s" 
        repeatCount="1" />
          </g>
          <g id="_x34_">
            <rect class="cls-2" x="505.9" y="384.4" width="75.1" height="265.7"/>
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s" 
        repeatCount="1" />
          </g>
        </g>
      </g>
    </g>
  </g>
</svg>

现在它从左上角开始奇怪地飞进来。我不知道是否可以收缩和拉伸其中任何一个条。我希望你明白我想做什么。

html svg svg-animate svg-animationelements
1个回答
0
投票

您只需通过调整 x、y 值并将其替换为父级上的平移来更改矩形原点。然后动画将从不同的地方开始。

我还更改了 animateTransform,使其作用于 rect 而不是 g 元素,这样它就不会覆盖我在此处添加的变换。我可以在 animateTransform 上使用additive="sum",而不是这样做。

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1350.8 841">
  <defs>
    <style>
      .cls-1 {
        fill: #3c3c3c;
      }

      .cls-2 {
        fill: #cacbce;
      }

      .cls-3 {
        fill: #9b999b;
      }
    </style>
  </defs>
  <!-- Generator: Adobe Illustrator 28.7.1, SVG Export Plug-In . SVG Version: 1.2.0 Build 142)  -->
  <g>
    <g id="diagramm">
      <g id="Diagramm">
        <g>
          <path class="cls-1" d="M157.1,530.5c-2,0-4-.9-5.4-2.6-2.4-3-1.9-7.3,1-9.7l197.4-159.3,46.6,58.8,201.8-165c3-2.4,7.3-2,9.7,1s2,7.3-1,9.7l-212.7,173.9-46.7-58.9-186.5,150.6c-1.3,1-2.8,1.5-4.3,1.5h0Z"/>
          <path class="cls-1" d="M603,336.2c-3.8,0-6.9-3.1-6.9-6.9v-66.7h-65.8c-3.8,0-6.9-3.1-6.9-6.9s3.1-6.9,6.9-6.9h79.7v80.6c0,3.8-3.1,6.9-6.9,6.9h0Z"/>
        </g>
        <g id="Diagramm_3">
          <g id="_x31_" transform="translate(194.9, 535.2) translate(37.55, 115.3)">
            <rect class="cls-3" x="-37.55" y="-115.3" width="75.1" height="115.3">
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s"
        repeatCount="1" />
          </rect>
          </g>
          <g id="_x32_" transform="translate(298.6, 451.3) translate(37.55, 198.8)">
            <rect class="cls-2" x="-37.55" y="-198.8" width="75.1" height="198.8">
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s" 
        additive="sum"
        repeatCount="1">
        </rect>
          </g>
          <g id="_x33_" transform="translate(402.2, 464.5) translate(37.55, 185.6)">
            <rect class="cls-3" x="-37.55" y="-185.6" width="75.1" height="185.6">
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s"
        repeatCount="1" />
        </rect>
          </g>
          <g id="_x34_" transform="translate(505.9, 384.4) translate(37.55, 265.5)">
            <rect class="cls-2" x="-37.55" y="-265.7" width="75.1" height="265.7">
            <animateTransform  
        attributeType="xml"
        attributeName="transform" 
        type="scale"
        values="0; 1;"
        begin="0.4s" 
        dur="4s"
        repeatCount="1" />
        </rect>
          </g>
        </g>
      </g>
    </g>
  </g>
</svg>

© www.soinside.com 2019 - 2024. All rights reserved.