Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.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
Image SVG在导入后变为黑色_Image_Svg_Import_Graphics_Adobe Illustrator - Fatal编程技术网

Image SVG在导入后变为黑色

Image SVG在导入后变为黑色,image,svg,import,graphics,adobe-illustrator,Image,Svg,Import,Graphics,Adobe Illustrator,我有一个附加的SVG,它在我的浏览器中看起来很好,但是如果我想将它导入figma,它只会显示一个黑框 它不是导致问题的rgba语法。() 但我不知道哪些元素也是不允许的 <?xml version="1.0" encoding="UTF-8"?> <svg class="cracker-loading-logging" width="500px" viewBox="0 0 782 415" version="1.1" xmlns="http://www.w3.org/2000/

我有一个附加的SVG,它在我的浏览器中看起来很好,但是如果我想将它导入figma,它只会显示一个黑框

它不是导致问题的rgba语法。()
但我不知道哪些元素也是不允许的

<?xml version="1.0" encoding="UTF-8"?>
<svg class="cracker-loading-logging" width="500px" viewBox="0 0 782 415" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <mask id="logo-logging">
      <!-- Outline -->
      <path d="M204.5,396.510452 C191.445231,396.510452 190.685044,406.440239 178.390463,404.821626 C166.095882,403.203014 167.931614,393.414826 155.321676,390.036003 C142.711738,386.65718 139.407435,396.051866 127.950709,391.306335 C116.493984,386.560804 120.800535,377.581263 109.494774,371.053879 C98.1890124,364.526494 92.5657773,372.745848 82.727664,365.196798 C72.8895508,357.647748 79.3734361,350.088795 70.1423206,340.857679 C60.9112051,331.626564 53.3522519,338.110449 45.8032021,328.272336 C38.2541522,318.434223 46.4735056,312.810988 39.9461212,301.505226 C33.4187369,290.199465 24.4391957,294.506016 19.6936646,283.049291 C14.9481335,271.592565 24.3428195,268.288262 20.9639968,255.678324 C17.585174,243.068386 7.79698582,244.904118 6.17837353,232.609537 C4.55976123,220.314956 14.4895476,219.554769 14.4895476,206.5 C14.4895476,193.445231 4.55976123,192.685044 6.17837353,180.390463 C7.79698582,168.095882 17.585174,169.931614 20.9639968,157.321676 C24.3428195,144.711738 14.9481335,141.407435 19.6936646,129.950709 C24.4391957,118.493984 33.4187369,122.800535 39.9461212,111.494774 C46.4735056,100.189012 38.2541522,94.5657773 45.8032021,84.727664 C53.3522519,74.8895508 60.9112051,81.3734361 70.1423206,72.1423206 C79.3734361,62.9112051 72.8895508,55.3522519 82.727664,47.8032021 C92.5657773,40.2541522 98.1890124,48.4735056 109.494774,41.9461212 C120.800535,35.4187369 116.493984,26.4391957 127.950709,21.6936646 C139.407435,16.9481335 142.711738,26.3428195 155.321676,22.9639968 C167.931614,19.585174 166.095882,9.79698582 178.390463,8.17837353 C190.685044,6.55976123 191.445231,16.4895476 204.5,16.4895476 C217.554769,16.4895476 218.314956,6.55976123 230.609537,8.17837353 C242.904118,9.79698582 241.068386,19.585174 253.678324,22.9639968 C266.288262,26.3428195 269.592565,16.9481335 281.049291,21.6936646 C292.506016,26.4391957 288.199465,35.4187369 299.505226,41.9461212 C310.810988,48.4735056 316.434223,40.2541522 326.272336,47.8032021 C336.110449,55.3522519 329.626564,62.9112051 338.857679,72.1423206 C348.088795,81.3734361 355.647748,74.8895508 363.196798,84.727664 C370.745848,94.5657773 362.526494,100.189012 369.053879,111.494774 C375.581263,122.800535 384.560804,118.493984 389.306335,129.950709 C394.051866,141.407435 384.65718,144.711738 388.036003,157.321676 C391.414826,169.931614 401.203014,168.095882 402.821626,180.390463 C404.440239,192.685044 394.510452,193.445231 394.510452,206.5 C394.510452,219.554769 404.440239,220.314956 402.821626,232.609537 C401.203014,244.904118 391.414826,243.068386 388.036003,255.678324 C384.65718,268.288262 394.051866,271.592565 389.306335,283.049291 C384.560804,294.506016 375.581263,290.199465 369.053879,301.505226 C362.526494,312.810988 370.745848,318.434223 363.196798,328.272336 C355.647748,338.110449 348.088795,331.626564 338.857679,340.857679 C329.626564,350.088795 336.110449,357.647748 326.272336,365.196798 C316.434223,372.745848 310.810988,364.526494 299.505226,371.053879 C288.199465,377.581263 292.506016,386.560804 281.049291,391.306335 C269.592565,396.051866 266.288262,386.65718 253.678324,390.036003 C241.068386,393.414826 242.904118,403.203014 230.609537,404.821626 C218.314956,406.440239 217.554769,396.510452 204.5,396.510452 Z" id="Base" fill="#FFFFFF" 
      style=".cracker-loading-logging {fill: #FFFFFF;}"></path>
      <!-- Mouth cut out -->
      <polygon class="cut" fill="#000000" points="204 206.5 411 405 411 8"></polygon>
      <!-- Dots in surface -->
      <circle fill="#000000" cx="147" cy="107" r="16"></circle>
      <circle fill="#000000" cx="261" cy="107" r="16"></circle>
      <circle fill="#000000" cx="261" cy="305" r="16"></circle>
      <circle fill="#000000" cx="147" cy="305" r="16"></circle>
      <circle fill="#000000" cx="80" cy="206" r="16"></circle>
    </mask>
  </defs>
  <rect mask="url(#logo-logging)" width="100%" height="100%"/>
</svg>

style
属性肯定是错误的。不能将CSS选择器放入
style`元素中。无论如何,您都可以删除它,因为它似乎没有做任何有用的事情。也许菲格玛不喜欢。我想去掉它会有帮助的

如果它仍然只显示一个黑色矩形,则表明Figma要么不支持
mask
元素,要么在解析或取消引用它时遇到问题。您的文档中是否有其他SVG具有相同的
id=“logo logo logging”
?如果有,那么这个SVG可能使用错误的掩码定义

它不需要是面具。事实上,你的图标是一个从矩形中剪下的饼状,这有点奇怪。如果你把它改成一个饼状,我想它在Figma中会更好用

这是一个不使用遮罩的版本。应该没问题



这可能与:
style=“.cracker加载日志{fill:#FFFFFF;}”
有关,这对我来说似乎很奇怪。在我的第一个版本中,有一个单独的样式元素和css内容,但它对我也不起作用