view+text实现原生静态按钮
目录如下
index.wxml
<!--按钮-->
<view class="button">
<text>使用</text>
</view>
index.wxss
/* pages/index/index.wxss */
.button {
width: 100%;
padding: 20rpx 20rpx;
background: red;
}
.button text {
position: relative;
display: inline-block;
background-color: rgb(73, 215, 240);
width: 140rpx;
height: 0;
line-height: 0rpx;
padding: 28rpx 0;
text-align: center;
font-size: 25rpx;
color: #fff;
border-radius: 10rpx;
}