button设置了open-type=‘share’,如何放上分享图标呢?

发布于 6 年前作者 fujing12015 次浏览最后编辑 6 年前来自 ask

button设置了open-type=‘share’,如何放上分享图标呢?

4 回复
fang64
fang641 楼6 年前

button::after{

    display:none;

}

qiang76
qiang762 楼6 年前
<button open-type="share">
<image src='/image/wx.png' class='button-image'></image>

<text class='button-text'>分享好友</text>

</button>


button {
  background-color:white;
  position:relative;
  display: flex;
  padding-left: 0rpx;
  padding-right: 0rpx;
  line-height: 0;
  overflow:visible;
  flex-direction: column;
  border: none;
  border-radius: 0;
  width: 80rpx;
  height: 76rpx;
  align-items: center;
}
 
button::after {
  border: none;
  border-radius: 0;
}

效果

guiying69
guiying693 楼6 年前

那如何去掉button的本身背景

longyong
longyong4 楼4 年前

<button open-type='share'>

    <image src='your image url'></image>
</button>
<!-- 使用IconFont -->
<button open-type='share'>
    <view class='fa fa-share'></view>
</button>
  1. 在button里面插入图片(很low,不建议使用)

  2. 在button里面添加类名,用css设置背景(更low,不建议使用)

  3. 在button添加IconFont,使用方法https://image.wxopen.club/content_04efc606-3546-11ea-b236-a0999b08aadb.png