关于底部固定按钮的样式设置

.bot-button {
      position: fixed;
      z-index: 2;
      bottom: 0rpx;
      padding: 16rpx 20rpx;
      background-color: rgb(255,255,255);
      border-top: 2rpx solid rgb(216,216,216);
      .button {
        width: 710rpx;
        height: 80rpx;
        border-radius: 40rpx;
        line-height: 80rpx;
        text-align: center;
        font-size: 32rpx;
        color: rgb(255, 255, 255);
        background: linear-gradient(to right, rgb(253, 65, 24), rgb(255, 133, 29));
      }
    }

类似效果,按钮在底部固定定位(fixed,配合z-index),外部包裹div元素,使用padding把剩余空间填充,

 

posted @ 2020-11-11 11:36  sunRise113  阅读(339)  评论(0编辑  收藏  举报