关于小程序开发相关问题解决方案系列一
发布于 4 年前 作者 lixiong 2845 次浏览 来自 分享

后面我会出 一个系列:关于小程序开发相关问题解决方案系列,具体讲述小程序开发过程中遇到的问题以及解决方案

今天讲第一个问题:如何去掉分享按钮的样式

1、小程序分享由于必须用到button按钮的open-type,所以就自带了button的样式,但是button样式有时候跟小程序整体风格不一致,这个时候,就需要对按钮样式进行改造,这几天翻过社区的几个帖子,最终找到解决方案

具体请参考帖子

https://developers.weixin.qq.com/community/develop/doc/0002ac6bdc88e014c5b92199a5b400

有热心朋友在评论区给了可选方案,可以采用

.share-button,
.contact-button {
  clear: both;
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  text-decoration: none;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  background: none;
  color: #52b0ff;
  cursor: pointer;
}

.share-button::after,
.contact-button::after {
  border: 0;
  box-shadow: 0;
}

// 我都是这么写的

非常感谢评论席热心观众

1 回复
.share-button,
.contact-button {
  clear: both;
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  text-decoration: none;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  background: none;
  color: #52b0ff;
  cursor: pointer;
}

.share-button::after,
.contact-button::after {
  border: 0;
  box-shadow: 0;
}

// 我都是这么写的
回到顶部