简体   繁体   English

防止背景颜色重叠透明图标

[英]Prevent background color from overlapping transparent icon

I have an icon in a button, and I want the icon to be transparent and the button background color to be white.我在按钮中有一个图标,我希望图标是透明的,按钮背景颜色是白色的。 But the white background color is overlapping the transparency of the icon.但是白色背景颜色与图标的透明度重叠。 Is there a work around for this?有解决办法吗?

here is the html code:这是 html 代码:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM