直接把元素写在标签里面(按钮“确认支付”)
wxml
<button style="width:548rpx;height:120rpx;padding:0;background-color: #2966EE;" class="payButton"> 确认支付 </button>
wxss
/* 支付按钮 */ .payButton{ position:absolute; top: 500px; color: white; border-radius: 98rpx; display: flex; justify-content: center; align-items: center; }
color: white;这行代码注释掉后,点击按钮会发现按钮里的字会闪烁一下