收藏
评论

cover-view里的按钮真机不显示

在 cover-view 里面嵌套的 button 如果没有内容,设置样式在真机中是不会显示的。

<cover-view>
    <button style="background: red; width: 60rpx; height: 60rpx;">
    </button>
</cover-view>


解决方法:在 button 里面嵌套 cover-view 即可。

<cover-view>
    <button style="background: red; width: 60rpx;">
        <cover-view style=" height: 60rpx;" />
    </button>
</cover-view>


收藏

1 个评论

  • 2018-12-10

    。。。如果没有特别的作用。。为啥要用button呢。。用cover-view不是一样的,都是绑自己写的点击事件

    2018-12-10
    赞同
    回复
登录 后发表内容