为什么在view中添加一个botton字体会被加粗左边也有边距了?
发布于 6 年前 作者 fanyang 13846 次浏览 来自 官方Issues

1 回复

button有默认样式的

建议这样写

view

<view class='view'>
    <button class='button' open-type='share'></button>
    分享
</view>

css

.view{
  position: relative;
  color#333;
}
.view .button{
  position: absolute;
  width100%;
  height100%;
  z-index1;
  opacity0;
}
.view .button::after{
  display: none;
}
回到顶部