我在侧边栏使用Jasny Bootstrap,但我想让主容器不被推到窗口的右侧,而是被挤进去。
我注意到这this.slide(elements, offset, $.proxy(complete, this))
条线OffCanvas.prototype.show
导致它被推到一边。
我能够让它“挤压”,但动画不再起作用。我在以下位置添加了这些行OffCanvas.prototype.slide
:
if (placement == 'left') {
placement = 'margin-left';
}
if (placement == 'right') {
placement = 'margin-right';
}
这是一个jsfiddle:https ://jsfiddle.net/e02e1rwp/1/