【问题标题】:Prevent background color from overlapping transparent icon防止背景颜色重叠透明图标
【发布时间】:2021-04-22 00:25:28
【问题描述】:

我在按钮中有一个图标,我希望图标是透明的,按钮背景颜色是白色的。但是白色背景颜色与图标的透明度重叠。有解决办法吗?

这里是html代码:

<button id="submit-btn">
      <i class="fa fa-plus" style={{ fontSize: "48px" }}></i>
</button>

【问题讨论】:

  • 你能把它放在 Codepen 或 JSFiddle 上,以便我们更好地了解正在发生的事情吗?

标签: html css reactjs web


【解决方案1】:
<button id="submit-btn" style={{backgroundColor:"#FFFFFF"}}>
      <i class="fa fa-plus" style={{ fontSize: "48px", color:'#000000' }}></i>
</button>

【讨论】:

  • 不行,只会让图标变黑
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-11-05
  • 2012-06-26
  • 1970-01-01
  • 1970-01-01
  • 2021-05-13
  • 2017-08-11
  • 1970-01-01
相关资源
最近更新 更多