Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何将动画svg代码保存到.svg文件中?_Html_Svg_Gif_Svg Animate - Fatal编程技术网

Html 如何将动画svg代码保存到.svg文件中?

Html 如何将动画svg代码保存到.svg文件中?,html,svg,gif,svg-animate,Html,Svg,Gif,Svg Animate,如何将动画svg代码保存到.svg文件中? 我试着把它放在一个文件中,并用.svg保存它,但这完全消除了动画代码,使svg保持静态 有没有关于如何做到这一点,请或将代码转换为gif的想法 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" style

如何将动画svg代码保存到.svg文件中? 我试着把它放在一个文件中,并用.svg保存它,但这完全消除了动画代码,使svg保持静态

有没有关于如何做到这一点,请或将代码转换为gif的想法

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" style="transform-origin: 50px 50px 0px;" xml:space="preserve"><g style="transform-origin: 50px 50px 0px;"><g style="transform-origin: 50px 50px 0px; transform: scale(0.44);"><g style="transform-origin: 50px 50px 0px; animation-duration: 1.3s; animation-delay: -1.3s; animation-direction: normal;" class=""><g><style type="text/css" class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -2s; animation-direction: normal;">.st0{fill:#F4E6C8;} .st1{opacity:0.8;fill:#849B87;} .st2{fill:#D65A62;} .st3{fill:#E15C64;} .st4{fill:#F47E5F;} .st5{fill:#F7B26A;} .st6{fill:#FEE8A2;} .st7{fill:#ACBD81;} .st8{fill:#F5E169;} .st9{fill:#F0AF6B;} .st10{fill:#EA7C60;} .st11{fill:#A8B980;} .st12{fill:#829985;} .st13{fill:#798AAE;} .st14{fill:#8672A7;} .st15{fill:#CC5960;} .st16{fill:#E17A5F;} .st17{fill:#849B87;} .st18{opacity:0.8;fill:#E15C64;} .st19{opacity:0.8;fill:#F7B26A;} .st20{fill:#79A5B5;} .st21{opacity:0.8;fill:#79A5B4;} .st22{fill:#666766;}</style><g class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1.85714s; animation-direction: normal;"><rect x="12.5" y="25" class="st2" width="15" height="50" fill="#8bb4d7" style="fill: rgb(139, 180, 215);"></rect></g><g class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1.71429s; animation-direction: normal;"><rect x="32.5" y="25" class="st10" width="15" height="50" fill="#000000" style="fill: rgb(0, 0, 0);"></rect></g><g class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1.57143s; animation-direction: normal;"><rect x="52.5" y="25" class="st9" width="15" height="50" fill="#939598" style="fill: rgb(147, 149, 152);"></rect></g><g class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1.42857s; animation-direction: normal;"><rect x="72.5" y="25" class="st11" width="15" height="50" fill="#dcddde" style="fill: rgb(220, 221, 222);"></rect></g><metadata xmlns:d="https://loading.io/stock/" class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1.28571s; animation-direction: normal;">
<d:name class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1.14286s; animation-direction: normal;">bar</d:name>
<d:tags class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -1s; animation-direction: normal;">facebook,block,rectangle,progress,waiting,bar,spinner</d:tags>
<d:license class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -0.857143s; animation-direction: normal;">cc-by</d:license>
<d:slug class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -0.714286s; animation-direction: normal;">f15w9p</d:slug>
</metadata></g></g></g></g><style type="text/css" class="ld ld-breath" style="transform-origin: 50px 50px 0px; animation-duration: 2s; animation-delay: -0.571429s; animation-direction: normal;">path,ellipse,circle,rect,polygon,polyline,line { stroke-width: 0; }@keyframes ld-breath {
  0% {
    -webkit-transform: scale(0.86);
    transform: scale(0.86);
  }
  50% {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
  }
  100% {
    -webkit-transform: scale(0.86);
    transform: scale(0.86);
  }
}
@-webkit-keyframes ld-breath {
  0% {
    -webkit-transform: scale(0.86);
    transform: scale(0.86);
  }
  50% {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
  }
  100% {
    -webkit-transform: scale(0.86);
    transform: scale(0.86);
  }
}
.ld.ld-breath {
  -webkit-animation: ld-breath 1s infinite;
  animation: ld-breath 1s infinite;
}
[代码><代码>.st0{0.0{{0.代码>.st0{{0.代码>.st0{{0.代码>.st0{0.st2{0.st2{0.st0{0.st0{{填充:{填充:?F4E666666666C8.T0.T0.T0.T0}填充::::40代码代码:40代码::40代码代码:40代码:40代码::55555555555555555555555555555555555555566666666666666777777CCCCCC8:::::::::::::::::::::::::\af6b;}.st10{fill:#EA7C60;}.st11{fill:#A8B980;}.st12{fill:#829985;}.st13{fill:#798AAE;}.st14{fill:#8672A7;}.st15{fill:#CC5960;}.st16st17{fill:{849B87;}.st18{opacity:0.8;fill:E15C64;}.st19{opacity:0.8;fill:F7B26A;}.st20{fill:79A5B5;}.st21{opacity:0.8;fill:79A5B4;}.st22{fill:666766;} 酒吧 facebook、块、矩形、进度、等待、栏、微调器 抄送人 f15w9p 路径、椭圆、圆、矩形、多边形、多段线、直线{笔划宽度:0;}@keyframes{ 0% { -webkit变换:比例(0.86); 变换:尺度(0.86); } 50% { -webkit转换:比例(1.06); 转换:比例(1.06); } 100% { -webkit变换:比例(0.86); 变换:尺度(0.86); } } @-webkit关键帧ld呼吸{ 0% { -webkit变换:比例(0.86); 变换:尺度(0.86); } 50% { -webkit转换:比例(1.06); 转换:比例(1.06); } 100% { -webkit变换:比例(0.86); 变换:尺度(0.86); } } .ld.ld-breath{ -webkit动画:ld呼吸1s无限; 动画:ld呼吸1s无限; }

您刚刚忘记关闭svg标记。请在末尾添加
。 您的文件应如下所示:


.st0{fill:#F4E6C8;}
.st1{不透明度:0.8;填充:#849B87;}
.st2{fill:#D65A62;}
.st3{fill:#E15C64;}
.st4{fill:#F47E5F;}
.st5{fill:#F7B26A;}
.st6{fill:#FEE8A2;}
.st7{fill:#ACBD81;}
.st8{fill:#F5E169;}
.st9{fill:#F0AF6B;}
.st10{fill:#EA7C60;}
.st11{fill:#A8B980;}
.st12{fill:#829985;}
.st13{fill:#798AAE;}
.st14{fill:#8672A7;}
.st15{fill:#CC5960;}
.st16{fill:#E17A5F;}
.st17{填写:#849B87;}
.st18{不透明度:0.8;填充:#E15C64;}.st19{不透明度:0.8;填充:#F7B26A;}
.st20{fill:#79A5B5;}.st21{不透明度:0.8;fill:#79A5B4;}
.st22{fill:#666766;}
路径、椭圆、圆、矩形、多边形、多段线、直线{笔划宽度:0;}@keyframes{
0% {
-webkit变换:比例(0.86);
变换:尺度(0.86);
}
50% {
-webkit转换:比例(1.06);
转换:比例(1.06);
}
100% {
-webkit变换:比例(0.86);
变换:尺度(0.86);
}
}
@-webkit关键帧ld呼吸{
0% {
-webkit变换:比例(0.86);
变换:尺度(0.86);
}
50% {
-webkit转换:比例(1.06);
转换:比例(1.06);
}
100% {
-webkit变换:比例(0.86);
变换:尺度(0.86);
}
}
.ld.ld-breath{
-webkit动画:ld呼吸1s无限;
动画:ld呼吸1s无限;
}
酒吧
facebook、块、矩形、进度、等待、栏、微调器
抄送人
f15w9p