棘轮js模态位置

时间:2015-09-11 19:29:19

标签: javascript html css css3 ratchet-bootstrap

我的模态从右侧滑出,我的模态尺寸设置为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);
}

0 个答案:

没有答案