显示菜单时自动调整列

时间:2014-06-19 09:37:44

标签: javascript twitter-bootstrap twitter-bootstrap-3

我正在尝试使用标准的Bootstrap 3来实现像shown here这样的左侧栏菜单,但是我只是设法将剩下的列从屏幕上移除。

看看这样的例子: 菜单折叠时:

enter image description here

当它扩展时会发生这种情况: enter image description here

引导程序示例为here

有没有办法阻止屏幕移出视野?

此致 基兰

1 个答案:

答案 0 :(得分:0)

@media screen and (max-width: 768px)
.row-offcanvas {
position: relative;
-webkit-transition: all 0.25s ease-out;
-moz-transition: all 0.25s ease-out;
transition: all 0.25s ease-out;
}

将上述position:relative更改为position:absolute

这样可以防止左栏将主要内容推出视野,主要内容会反过来缩小。但是,你需要调整一些样式到你扩展的左侧栏,你会看到(虽然不是太多)。

编辑:第297行

相关问题