【问题标题】:Remove the white outer border in ant design icons删除蚂蚁设计图标中的白色外边框
【发布时间】:2020-12-28 23:23:21
【问题描述】:

我使用此代码设置了 ant design 图标的粗细,但正如您在图像中看到的那样,有白色的外边框。谁能帮我去掉这个白色的外边框,同时保持厚度更薄?

我的代码看起来像

import { PlusCircleOutlined} from "@ant-design/icons";
    <PlusCircleOutlined
                     
                      style={{
                        fontSize: "54px",
                        color: "#408021",
                        stroke:"white",
                        strokeWidth:"40"
                      }}
                    />

【问题讨论】:

  • 您不应该删除strokeWidth 属性吗?外部白色边框是由设置的属性引起的,所以对我来说似乎很明显。我错过了问题的重点吗?

标签: css reactjs ant-design-pro


【解决方案1】:

删除strokestrokeWidth

import { PlusCircleOutlined} from "@ant-design/icons";
<PlusCircleOutlined
                 
                  style={{
                    fontSize: "54px",
                    color: "#408021"
                  }}
                />

【讨论】:

  • 感谢您的回答,但我必须保持当前的厚度。如果我删除 stroke 属性,圆圈会变粗,这不是我想要的。
  • 请添加您希望的示例和您的工作链接,以便我可以帮助您解决此问题
猜你喜欢
  • 2021-06-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-04
  • 1970-01-01
  • 1970-01-01
  • 2020-12-27
  • 2020-07-12
相关资源
最近更新 更多