当Bootstrap对话框打开或关闭时,Bootstrap 3更新会抖动UI。我怎样才能摆脱这种行为?

时间:2015-04-13 05:37:27

标签: jquery html twitter-bootstrap twitter-bootstrap-3

我观察到当bootstrap对话框打开时,html的body标签会跟随css。

<body class="modal-open" style="padding-right: 17px;">

我认为这会导致用户界面动摇。我怎样才能摆脱这种奇怪的行为。 我创造了小提琴。但是这个问题并没有产生。但在我的本地环境中,我能够重现这一点。 JSFiddle

2 个答案:

答案 0 :(得分:2)

只需将此添加到您的css:

.modal-open {
  padding-right: 0px !important;
}

答案 1 :(得分:1)

我通过

解决了问题
body.modal-open {
padding-right: 0px !important;
overflow-y: auto;
}