小程序修改按钮大小

直接把元素写在标签里面(按钮“确认支付”)

 

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;这行代码注释掉后,点击按钮会发现按钮里的字会闪烁一下

 

posted @ 2022-01-08 22:29  Java仲达  阅读(247)  评论(0)    收藏  举报