我的应用程序中有一些SVG文件用作图像。很少有图像没有显示,所以如何检查这些文件是否损坏。
我必须将所有损坏的文件发送到UX团队
请在下面找到SVG html内容
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<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 440 312" style="enable-background:new 0 0 440 312;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#FFFFFF;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st1{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;}
</style>
<g>
<path id="XMLID_107_" class="st0" d="M359.4,127.7c0-2.2,1.8-4,4-4h21.5c2.2,0,4,1.8,4,4c0,2.2-1.8,4-4,4h-21.5
C361.2,131.7,359.4,129.9,359.4,127.7z M356.1,119.8c0-2.2,1.8-4,4-4h28.1c2.2,0,4,1.8,4,4c0,2.2-1.8,4-4,4H360
C357.8,123.7,356.1,122,356.1,119.8z M353.7,111.9c0-2.2,1.8-4,4-4h32.9c2.2,0,4,1.8,4,4c0,2.2-1.8,4-4,4h-32.9
C355.4,115.9,353.7,114.1,353.7,111.9z M359.6,107.9l-3.4-12.4c-1-3.6-2.4-7.2-4.2-10.5l-4.1-7.6c-3.1-7.9-2.9-16.8,1.1-24.4
c4.5-8.5,13-14.6,23.6-15.1c0.5,0,0.9,0,1.4,0c4.1,0,8,0.8,11.6,2.4c8.1,3.5,13.7,10.4,15.9,18.4c1.8,6.5,1.1,13.4-1.7,19.5
l-3.8,7.5c-1.4,2.8-2.5,5.7-3.4,8.6l-4,13.6 M402.5,43.2L417,28.6 M345.8,43.2l-14.6-14.6 M374.1,31.6V11 M338.5,65.6h-20.6
M409.7,65.6h20.6"/>
<path class="st0" d="M375.3,97.4c0,0,9.3-1,9.1-10.8c-0.2-9.8-9-20.8-9.1-26.7"/>
<path class="st0" d="M375.3,59.9c0,0-8.5,15-9.1,21.1c-0.5,5,0.5,8.3,4.4,12.8"/>
<path class="st0" d="M373.4,83.9c0,0,4.3,12.9,0,24"/>
</g>
<g>
<polyline class="st0" points="88.5,291 11.3,291 11.3,113.6 99.7,113.6 99.7,156.5 "/>
<polyline class="st0" points="24.3,113.6 24.3,102.5 86.7,102.5 86.7,113.6 "/>
<polyline class="st0" points="36.5,102.5 36.5,86.1 74.5,86.1 74.5,102.5 "/>
<polyline class="st0" points="47,84.5 55.7,39 64.4,84.9 "/>
<path id="XMLID_106_" class="st0" d="M87.9,291V161.2c0-2.4,1.9-4.3,4.3-4.3h81.5c2.5,0,4.6,2,4.6,4.6V291H87.9"/>
<line id="XMLID_105_" class="st0" x1="127" y1="275.2" x2="127" y2="276"/>
<line id="XMLID_104_" class="st0" x1="139.2" y1="275.2" x2="139.2" y2="276"/>
<path id="XMLID_103_" class="st0" d="M147.5,291h-28.7v-30.2c0-1.4,1.2-2.6,2.6-2.6h23.6c1.4,0,2.6,1.2,2.6,2.6V291z"/>
<path id="XMLID_102_" class="st0" d="M74,291H37v-30.2c0-1.4,1.2-2.6,2.6-2.6h31.9c1.4,0,2.6,1.2,2.6,2.6V291z"/>
<rect id="XMLID_101_" x="141.1" y="230.2" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_100_" x="113" y="230.2" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_99_" x="141.1" y="200.8" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_98_" x="113" y="200.8" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_97_" x="141.1" y="172.9" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_96_" x="113" y="172.9" class="st0" width="12.2" height="14.8"/>
<line id="XMLID_95_" class="st0" x1="133.1" y1="259.3" x2="133.1" y2="291"/>
<rect id="XMLID_94_" x="30.6" y="130.1" class="st0" width="17" height="11.6"/>
<rect id="XMLID_93_" x="63.9" y="130.1" class="st0" width="17" height="11.6"/>
<rect id="XMLID_92_" x="30.6" y="159.3" class="st0" width="17" height="11.6"/>
<rect id="XMLID_91_" x="63.9" y="159.3" class="st0" width="17" height="11.6"/>
<rect id="XMLID_90_" x="30.6" y="188.4" class="st0" width="17" height="11.6"/>
<rect id="XMLID_89_" x="63.9" y="188.4" class="st0" width="17" height="11.6"/>
<rect id="XMLID_88_" x="30.6" y="217.6" class="st0" width="17" height="11.6"/>
<rect id="XMLID_87_" x="63.9" y="217.6" class="st0" width="17" height="11.6"/>
<line class="st0" x1="44.9" y1="276" x2="65.3" y2="276"/>
<line class="st0" x1="55.1" y1="258.2" x2="55.1" y2="291"/>
<polyline class="st0" points="178.3,291 253.3,291 253.3,253.4 178.5,253.4 "/>
<polyline class="st0" points="117.3,156.8 117.3,125.3 233.2,125.3 233.2,253.4 "/>
<rect x="222.5" y="262.1" class="st0" width="21" height="21"/>
<rect x="189.4" y="262.1" class="st0" width="21" height="21"/>
<rect x="127" y="139" class="st0" width="94.4" height="9.6"/>
<polyline class="st0" points="178.9,166.6 221.4,166.6 221.4,176.2 178.3,176.2 "/>
<polyline class="st0" points="178.3,194.2 221.4,194.2 221.4,203.8 178.3,203.8 "/>
<polyline class="st0" points="178.3,221.8 221.4,221.8 221.4,231.4 178.3,231.4 "/>
<rect x="198.4" y="109.8" class="st0" width="29.3" height="15.5"/>
</g>
<g>
<line class="st0" x1="290" y1="227.9" x2="234.1" y2="227.9"/>
</g>
<g>
<path class="st0" d="M374.8,186.7v36.2c0,2.8-2.3,5-5,5h-75.3"/>
</g>
<g>
<line class="st0" x1="374.8" y1="132.7" x2="374.8" y2="182.3"/>
</g>
<circle class="st1" cx="374.8" cy="184.5" r="2.2"/>
<circle class="st1" cx="292.3" cy="227.9" r="2.2"/>
</svg>
&#13;
由于
答案 0 :(得分:1)
文件没有损坏,它的白色轮廓形状没有填充白色背景。只需更改背景颜色即可查看图像......
body{background:red}
&#13;
<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 440 312" style="enable-background:new 0 0 440 312;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#FFFFFF;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st1{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;}
</style>
<g>
<path id="XMLID_107_" class="st0" d="M359.4,127.7c0-2.2,1.8-4,4-4h21.5c2.2,0,4,1.8,4,4c0,2.2-1.8,4-4,4h-21.5
C361.2,131.7,359.4,129.9,359.4,127.7z M356.1,119.8c0-2.2,1.8-4,4-4h28.1c2.2,0,4,1.8,4,4c0,2.2-1.8,4-4,4H360
C357.8,123.7,356.1,122,356.1,119.8z M353.7,111.9c0-2.2,1.8-4,4-4h32.9c2.2,0,4,1.8,4,4c0,2.2-1.8,4-4,4h-32.9
C355.4,115.9,353.7,114.1,353.7,111.9z M359.6,107.9l-3.4-12.4c-1-3.6-2.4-7.2-4.2-10.5l-4.1-7.6c-3.1-7.9-2.9-16.8,1.1-24.4
c4.5-8.5,13-14.6,23.6-15.1c0.5,0,0.9,0,1.4,0c4.1,0,8,0.8,11.6,2.4c8.1,3.5,13.7,10.4,15.9,18.4c1.8,6.5,1.1,13.4-1.7,19.5
l-3.8,7.5c-1.4,2.8-2.5,5.7-3.4,8.6l-4,13.6 M402.5,43.2L417,28.6 M345.8,43.2l-14.6-14.6 M374.1,31.6V11 M338.5,65.6h-20.6
M409.7,65.6h20.6"/>
<path class="st0" d="M375.3,97.4c0,0,9.3-1,9.1-10.8c-0.2-9.8-9-20.8-9.1-26.7"/>
<path class="st0" d="M375.3,59.9c0,0-8.5,15-9.1,21.1c-0.5,5,0.5,8.3,4.4,12.8"/>
<path class="st0" d="M373.4,83.9c0,0,4.3,12.9,0,24"/>
</g>
<g>
<polyline class="st0" points="88.5,291 11.3,291 11.3,113.6 99.7,113.6 99.7,156.5 "/>
<polyline class="st0" points="24.3,113.6 24.3,102.5 86.7,102.5 86.7,113.6 "/>
<polyline class="st0" points="36.5,102.5 36.5,86.1 74.5,86.1 74.5,102.5 "/>
<polyline class="st0" points="47,84.5 55.7,39 64.4,84.9 "/>
<path id="XMLID_106_" class="st0" d="M87.9,291V161.2c0-2.4,1.9-4.3,4.3-4.3h81.5c2.5,0,4.6,2,4.6,4.6V291H87.9"/>
<line id="XMLID_105_" class="st0" x1="127" y1="275.2" x2="127" y2="276"/>
<line id="XMLID_104_" class="st0" x1="139.2" y1="275.2" x2="139.2" y2="276"/>
<path id="XMLID_103_" class="st0" d="M147.5,291h-28.7v-30.2c0-1.4,1.2-2.6,2.6-2.6h23.6c1.4,0,2.6,1.2,2.6,2.6V291z"/>
<path id="XMLID_102_" class="st0" d="M74,291H37v-30.2c0-1.4,1.2-2.6,2.6-2.6h31.9c1.4,0,2.6,1.2,2.6,2.6V291z"/>
<rect id="XMLID_101_" x="141.1" y="230.2" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_100_" x="113" y="230.2" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_99_" x="141.1" y="200.8" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_98_" x="113" y="200.8" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_97_" x="141.1" y="172.9" class="st0" width="12.2" height="14.8"/>
<rect id="XMLID_96_" x="113" y="172.9" class="st0" width="12.2" height="14.8"/>
<line id="XMLID_95_" class="st0" x1="133.1" y1="259.3" x2="133.1" y2="291"/>
<rect id="XMLID_94_" x="30.6" y="130.1" class="st0" width="17" height="11.6"/>
<rect id="XMLID_93_" x="63.9" y="130.1" class="st0" width="17" height="11.6"/>
<rect id="XMLID_92_" x="30.6" y="159.3" class="st0" width="17" height="11.6"/>
<rect id="XMLID_91_" x="63.9" y="159.3" class="st0" width="17" height="11.6"/>
<rect id="XMLID_90_" x="30.6" y="188.4" class="st0" width="17" height="11.6"/>
<rect id="XMLID_89_" x="63.9" y="188.4" class="st0" width="17" height="11.6"/>
<rect id="XMLID_88_" x="30.6" y="217.6" class="st0" width="17" height="11.6"/>
<rect id="XMLID_87_" x="63.9" y="217.6" class="st0" width="17" height="11.6"/>
<line class="st0" x1="44.9" y1="276" x2="65.3" y2="276"/>
<line class="st0" x1="55.1" y1="258.2" x2="55.1" y2="291"/>
<polyline class="st0" points="178.3,291 253.3,291 253.3,253.4 178.5,253.4 "/>
<polyline class="st0" points="117.3,156.8 117.3,125.3 233.2,125.3 233.2,253.4 "/>
<rect x="222.5" y="262.1" class="st0" width="21" height="21"/>
<rect x="189.4" y="262.1" class="st0" width="21" height="21"/>
<rect x="127" y="139" class="st0" width="94.4" height="9.6"/>
<polyline class="st0" points="178.9,166.6 221.4,166.6 221.4,176.2 178.3,176.2 "/>
<polyline class="st0" points="178.3,194.2 221.4,194.2 221.4,203.8 178.3,203.8 "/>
<polyline class="st0" points="178.3,221.8 221.4,221.8 221.4,231.4 178.3,231.4 "/>
<rect x="198.4" y="109.8" class="st0" width="29.3" height="15.5"/>
</g>
<g>
<line class="st0" x1="290" y1="227.9" x2="234.1" y2="227.9"/>
</g>
<g>
<path class="st0" d="M374.8,186.7v36.2c0,2.8-2.3,5-5,5h-75.3"/>
</g>
<g>
<line class="st0" x1="374.8" y1="132.7" x2="374.8" y2="182.3"/>
</g>
<circle class="st1" cx="374.8" cy="184.5" r="2.2"/>
<circle class="st1" cx="292.3" cy="227.9" r="2.2"/>
</svg>
&#13;
答案 1 :(得分:0)
如果不确切知道它们是如何被破坏的话很难说,但你可以通过W3C Validator运行它们,如果你需要测试大量的文件你可以做通过他们的API编程。