0

我让模态从右侧滑出,我将模态大小设置为 80%,但它滑出到屏幕的左侧,但我希望它位于右侧。

我怎样才能做到这一点?

当前模式的代码是;

modal {
  position: fixed;
  top: 0;
  z-index: 11;
  width: 80%;
  min-height: 100%;
  overflow: hidden;
  background-color: #fff;
  opacity: 0;
  -webkit-transition: -webkit-transform .25s, opacity 1ms .25s;
     -moz-transition:    -moz-transform .25s, opacity 1ms .25s;
          transition:         transform .25s, opacity 1ms .25s;
  -webkit-transform: translate3d(100%, 0, 0);
      -ms-transform: translate3d(100%, 0, 0);
          transform: translate3d(100%, 0, 0);
}
.modal.active {
  height: 100%;
  opacity: 1;
  -webkit-transition: -webkit-transform .25s;
     -moz-transition:    -moz-transform .25s;
          transition:         transform .25s;
  -webkit-transform: translate3d(0, 0, 0);
      -ms-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}
4

0 回答 0