html – 从SVG中删除空格

html – 从SVG中删除空格,第1张

概述我找不到改变下面代码的方法来从SVG图像中删除空格.我应该修改或删除什么来实现这一目标?我正在使用这个网站编辑代码: https://petercollingridge.appspot.com/svg-editor/ 如何使用此代码查看SVG图像:请参阅here. <?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C 我找不到改变下面代码的方法来从SVG图像中删除空格.我应该修改或删除什么来实现这一目标?我正在使用这个网站编辑代码: https://petercollingridge.appspot.com/svg-editor/

如何使用此代码查看SVG图像:请参阅here.

<?xml version="1.0" enCoding="utf-8"?><!DOCTYPE svg PUBliC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" wIDth="250.0px" height="100.0px" overflow="visible" vIEwBox="0.0 0.0 250.0 100.0" enable-background="new 0.0 0.0 250.0 100.0">    <defs>        <radialGradIEnt ID="Grad1" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(0.0021972656 0.0 0.0 0.0040893555 120.8 38.55)" r="819.2" cx="0" cy="0">        </radialGradIEnt>        <linearGradIEnt ID="Grad2" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(0.0 0.001739502 -0.015563965 0.0 108.05 40.25)" x1="-819.2" y1="0" x2="819.2" y2="0">        </linearGradIEnt>        <radialGradIEnt ID="Grad3" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(-0.0021972656 0.0 0.0 0.0040893555 95.3 38.55)" r="819.2" cx="0" cy="0">        </radialGradIEnt>        <linearGradIEnt ID="Grad4" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(0.0 -0.001953125 0.015563965 0.0 108.05 36.95)" x1="-819.2" y1="0" x2="819.2" y2="0">        </linearGradIEnt>    </defs>    <g>        <g transform="matrix(1.0 0.0 0.0 1.0 0.0 0.0)">            <path fill="#DC0100" stroke-linecap="round" stroke-linejoin="round" d="M 232.05 57.75 L 230.45 60.6 L 221.85 68.25 L 221.5 67.9 C 221.2 67.6 220.84999 67.36666 220.45 67.2 L 221.9 61.85 L 223.5 62.4 L 226.05 57.25 L 227.2 57.85 L 229.95 55.95 L 232.05 57.75 Z M 227.85 82.2 L 226.65 83.0 L 226.65 86.35 L 224.2 87.15 L 222.5 84.45 L 219.6 84.75 L 219.0 84.7 L 219.25 80.35 L 219.35 80.35 C 221.61667 80.35 223.61667 79.75 225.35 78.55 L 227.85 82.2 Z M 212.3 82.8 C 211.23334 82.166664 210.25 81.416664 209.35 80.55 L 207.8 78.75 L 212.6 75.35 L 213.5 76.35 L 214.5 77.25 L 217.1 73.7 L 218.45 74.35 L 216.4 81.6 C 215.4 81.36667 214.46666 81.01667 213.6 80.55 L 212.3 82.8 Z M 205.15 70.3 L 201.75 68.9 L 202.25 65.6 L 205.85 65.6 C 206.45 63.8 207.4 62.15 208.7 60.65 L 207.25 58.15 L 209.1 56.2 L 211.7 58.1 L 213.75 61.2 C 213.11667 61.566666 212.53334 62.033333 212.0 62.6 C 210.43333 64.166664 209.45 65.96667 209.05 68.0 L 208.85 70.25 L 205.15 70.3 Z M 208.85 70.25 L 208.85 70.3 Z M 218.15 67.9 L 217.8 68.2 C 217.4 68.63333 217.18332 69.15 217.15 69.75 L 211.1 68.45 C 211.43333 66.816666 212.23334 65.36667 213.5 64.1 L 214.9 62.95 L 218.15 67.9 Z M 232.15 70.2 C 232.15 72.13333 231.76666 73.916664 231.0 75.55 L 223.55 72.0 C 223.78333 71.46667 223.9 70.88333 223.9 70.25 L 223.85 69.7 L 232.1 68.65 L 232.15 70.2 Z"/>            <path fill="#6C0B0B" stroke-linecap="round" stroke-linejoin="round" d="M 226.05 57.25 L 223.5 62.4 L 221.9 61.85 L 220.45 67.2 C 220.85 67.36666 221.20001 67.6 221.5 67.9 L 221.85 68.25 L 230.45 60.6 C 231.85 62.166668 232.85 63.9 233.45 65.8 L 233.45 65.9 L 235.95 65.9 L 236.4 66.15 L 236.9 68.4 C 235.96666 68.86667 235.01666 69.35 234.05 69.85 L 234.05 69.95 L 234.05 70.3 C 234.05 72.23333 233.73334 74.01666 233.1 75.65 L 235.3 78.35 L 233.85 80.2 L 230.95 79.35 L 229.85 80.55 L 228.05 82.1 L 227.85 82.2 L 225.35 78.55 C 223.61667 79.75 221.61667 80.35 219.35 80.35 L 219.25 80.35 L 219.0 84.7 L 218.75 84.7 L 216.65 84.45 L 214.7 87.15 L 212.3 86.35 L 212.3 82.8 L 213.6 80.55 C 214.46666 81.01667 215.4 81.36667 216.4 81.6 L 218.45 74.35 L 217.1 73.7 L 214.5 77.25 L 213.5 76.35 L 212.6 75.35 L 207.8 78.75 L 205.55 80.35 L 203.85 78.2 L 206.05 75.5 C 205.45 73.9 205.15 72.16667 205.15 70.3 L 208.85 70.3 L 209.05 68.0 C 209.45 65.96667 210.43333 64.166664 212.0 62.6 C 212.53334 62.033333 213.11667 61.566666 213.75 61.2 L 211.7 58.1 C 213.43333 56.93333 215.35 56.216663 217.45 55.95 L 218.3 52.9 L 220.9 52.9 L 221.7 55.95 C 223.23334 56.11667 224.68333 56.550003 226.05 57.25 Z M 219.0 84.7 L 219.0 84.75 Z M 208.85 70.3 L 208.85 70.25 Z M 217.8 68.2 L 218.15 67.9 L 214.9 62.95 L 213.5 64.1 C 212.23334 65.36667 211.43333 66.816666 211.1 68.45 L 217.15 69.75 C 217.18333 69.15 217.40001 68.63333 217.8 68.2 Z M 231.0 75.55 C 231.76666 73.916664 232.15 72.13333 232.15 70.2 L 232.1 68.65 L 223.85 69.7 L 223.9 70.25 C 223.9 70.88333 223.78333 71.46667 223.55 72.0 L 231.0 75.55 Z"/>        </g>    </g></svg>
解决方法 调整vIEwBox以便它只覆盖您想要的区域.我已经完成了下面的大部分工作,如果你需要,可以进一步收紧.

<?xml version="1.0" enCoding="utf-8"?><!DOCTYPE svg PUBliC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" wIDth="250.0px" height="100.0px" overflow="visible" vIEwBox="200.0 50.0 8.0 8.0" enable-background="new 0.0 0.0 250.0 100.0">    <defs>        <radialGradIEnt ID="Grad1" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(0.0021972656 0.0 0.0 0.0040893555 120.8 38.55)" r="819.2" cx="0" cy="0">        </radialGradIEnt>        <linearGradIEnt ID="Grad2" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(0.0 0.001739502 -0.015563965 0.0 108.05 40.25)" x1="-819.2" y1="0" x2="819.2" y2="0">        </linearGradIEnt>        <radialGradIEnt ID="Grad3" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(-0.0021972656 0.0 0.0 0.0040893555 95.3 38.55)" r="819.2" cx="0" cy="0">        </radialGradIEnt>        <linearGradIEnt ID="Grad4" gradIEntUnits="userSpaceOnUse" gradIEnttransform="matrix(0.0 -0.001953125 0.015563965 0.0 108.05 36.95)" x1="-819.2" y1="0" x2="819.2" y2="0">        </linearGradIEnt>    </defs>    <g>        <g transform="matrix(1.0 0.0 0.0 1.0 0.0 0.0)">            <path fill="#DC0100" stroke-linecap="round" stroke-linejoin="round" d="M 232.05 57.75 L 230.45 60.6 L 221.85 68.25 L 221.5 67.9 C 221.2 67.6 220.84999 67.36666 220.45 67.2 L 221.9 61.85 L 223.5 62.4 L 226.05 57.25 L 227.2 57.85 L 229.95 55.95 L 232.05 57.75 Z M 227.85 82.2 L 226.65 83.0 L 226.65 86.35 L 224.2 87.15 L 222.5 84.45 L 219.6 84.75 L 219.0 84.7 L 219.25 80.35 L 219.35 80.35 C 221.61667 80.35 223.61667 79.75 225.35 78.55 L 227.85 82.2 Z M 212.3 82.8 C 211.23334 82.166664 210.25 81.416664 209.35 80.55 L 207.8 78.75 L 212.6 75.35 L 213.5 76.35 L 214.5 77.25 L 217.1 73.7 L 218.45 74.35 L 216.4 81.6 C 215.4 81.36667 214.46666 81.01667 213.6 80.55 L 212.3 82.8 Z M 205.15 70.3 L 201.75 68.9 L 202.25 65.6 L 205.85 65.6 C 206.45 63.8 207.4 62.15 208.7 60.65 L 207.25 58.15 L 209.1 56.2 L 211.7 58.1 L 213.75 61.2 C 213.11667 61.566666 212.53334 62.033333 212.0 62.6 C 210.43333 64.166664 209.45 65.96667 209.05 68.0 L 208.85 70.25 L 205.15 70.3 Z M 208.85 70.25 L 208.85 70.3 Z M 218.15 67.9 L 217.8 68.2 C 217.4 68.63333 217.18332 69.15 217.15 69.75 L 211.1 68.45 C 211.43333 66.816666 212.23334 65.36667 213.5 64.1 L 214.9 62.95 L 218.15 67.9 Z M 232.15 70.2 C 232.15 72.13333 231.76666 73.916664 231.0 75.55 L 223.55 72.0 C 223.78333 71.46667 223.9 70.88333 223.9 70.25 L 223.85 69.7 L 232.1 68.65 L 232.15 70.2 Z"/>            <path fill="#6C0B0B" stroke-linecap="round" stroke-linejoin="round" d="M 226.05 57.25 L 223.5 62.4 L 221.9 61.85 L 220.45 67.2 C 220.85 67.36666 221.20001 67.6 221.5 67.9 L 221.85 68.25 L 230.45 60.6 C 231.85 62.166668 232.85 63.9 233.45 65.8 L 233.45 65.9 L 235.95 65.9 L 236.4 66.15 L 236.9 68.4 C 235.96666 68.86667 235.01666 69.35 234.05 69.85 L 234.05 69.95 L 234.05 70.3 C 234.05 72.23333 233.73334 74.01666 233.1 75.65 L 235.3 78.35 L 233.85 80.2 L 230.95 79.35 L 229.85 80.55 L 228.05 82.1 L 227.85 82.2 L 225.35 78.55 C 223.61667 79.75 221.61667 80.35 219.35 80.35 L 219.25 80.35 L 219.0 84.7 L 218.75 84.7 L 216.65 84.45 L 214.7 87.15 L 212.3 86.35 L 212.3 82.8 L 213.6 80.55 C 214.46666 81.01667 215.4 81.36667 216.4 81.6 L 218.45 74.35 L 217.1 73.7 L 214.5 77.25 L 213.5 76.35 L 212.6 75.35 L 207.8 78.75 L 205.55 80.35 L 203.85 78.2 L 206.05 75.5 C 205.45 73.9 205.15 72.16667 205.15 70.3 L 208.85 70.3 L 209.05 68.0 C 209.45 65.96667 210.43333 64.166664 212.0 62.6 C 212.53334 62.033333 213.11667 61.566666 213.75 61.2 L 211.7 58.1 C 213.43333 56.93333 215.35 56.216663 217.45 55.95 L 218.3 52.9 L 220.9 52.9 L 221.7 55.95 C 223.23334 56.11667 224.68333 56.550003 226.05 57.25 Z M 219.0 84.7 L 219.0 84.75 Z M 208.85 70.3 L 208.85 70.25 Z M 217.8 68.2 L 218.15 67.9 L 214.9 62.95 L 213.5 64.1 C 212.23334 65.36667 211.43333 66.816666 211.1 68.45 L 217.15 69.75 C 217.18333 69.15 217.40001 68.63333 217.8 68.2 Z M 231.0 75.55 C 231.76666 73.916664 232.15 72.13333 232.15 70.2 L 232.1 68.65 L 223.85 69.7 L 223.9 70.25 C 223.9 70.88333 223.78333 71.46667 223.55 72.0 L 231.0 75.55 Z"/>        </g>    </g></svg>
总结

以上是内存溢出为你收集整理的html – 从SVG中删除空格全部内容,希望文章能够帮你解决html – 从SVG中删除空格所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1087989.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-27
下一篇2022-05-27

发表评论

登录后才能评论

评论列表(0条)

    保存