modal.wxss 2.19 KB
/*  自定义弹窗  */

.mask {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1002;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}
.hidden {
  display: none !important;
}

.modal-wrapper:before {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1002;
  width: 100%;
  height: 100%;
  content: '';
  background: rgba(0, 0, 0, 0.4);
}
.modal-wrapper .modal {
  position: fixed;
  top: 50%;
  left: 8%;
  right: 8%;
  background: #fff;
  border-radius: 12px;
  z-index: 1004;
  transform: translate3d(0, -50%, 0);
  overflow: hidden;
}
.modal-wrapper .modal-bottom {
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  transform: translate3d(0, 0, 0);
}
.modal-wrapper .modal-top {
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  border-radius: 0;
  transform: translate3d(0, 0, 0);
}
.modal-wrapper .modal-sm {
  left: 12%;
  right: 12%;
}
.modal-wrapper .modal-block {
  left: 0;
  right: 0;
}
.modal-wrapper .modal.transparent-dark {
  background-color: rgba(0, 0, 0, 0.7);
  color: #FFF;
  width: 240rpx;
  max-width: 300rpx;
  margin: 0 auto;
}
.modal-wrapper .modal-header {
  padding: 68rpx 30rpx 0;
  text-align: center;
}
.modal-wrapper .modal-header .title {
  font-weight: normal;
  color: #333;
}
.modal-wrapper .modal-header.no-borders {
  padding: 15rpx;
}
.modal-wrapper .modal-header.no-borders + .modal-body {
  padding: 0 30rpx 22rpx;
}
.modal-wrapper .modal-body {
  overflow-y: auto;
  max-height: 660rpx;
  padding: 100rpx 15rpx;
  text-align: center;
}
.modal-wrapper .modal-footer {
  display: flex;
  border-top: 1rpx solid #D8D8D8;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}
.modal-wrapper .modal-footer .btn {
  padding: 24rpx;
  border: none;
  border-bottom: 0;
  border-radius: 0;
  flex: 1;
  font-size: 28rpx;
  color: #007AFF;
}
.modal-wrapper .modal-footer .btn + .btn {
  border-left: 1rpx solid #D8D8D8;
}
.modal-wrapper .modal-footer .btn-ok {
  color: #007AFF;
}
.mask_relative {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1002;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}