如何为取消 svg 图标中的“x”着色

问题描述 投票:0回答:1
css svg
1个回答
0
投票

尝试使用不同的 svg 图标,因为您当前的 svg 没有

fill
部分的
X
属性

这应该可以帮助你:

<svg class="frame" width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
  <g clip-path="url(#clip0_618_17)">
    <path
      d="M24 4C12.95 4 4 12.95 4 24C4 35.05 12.95 44 24 44C35.05 44 44 35.05 44 24C44 12.95 35.05 4 24 4ZM34 31.17L31.17 34L24 26.83L16.83 34L14 31.17L21.17 24L14 16.83L16.83 14L24 21.17L31.17 14L34 16.83L26.83 24L34 31.17Z"
      fill="#e5e5e5"
    /> <!-- Changes the CIRCLE color -->
    <path
      d="M34 31.17L31.17 34L24 26.83L16.83 34L14 31.17L21.17 24L14 16.83L16.83 14L24 21.17L31.17 14L34 16.83L26.83 24L34 31.17Z"
      fill="#292929"
    /> <!-- Changes the `X` color -->
  </g>
  <defs>
    <clipPath id="clip0_618_17">
      <rect width="48" height="48" fill="white" />
    </clipPath>
  </defs>
</svg>

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