Bootstrap 3 nav dropdown

亡梦爱人 提交于 2019-12-06 11:59:11

Yes.. this is a known bug in Bootstrap 3.0.2 --

(https://github.com/twbs/bootstrap/issues/11243)

One workaround is to..

.navbar-collapse.in {
    overflow-y: visible;
}

Demo: http://bootply.com/96924

Skelly's answer helped. Thank you. But since I was seeing a scrollbar during the collapsing activity, I needed to fix it like this:

.navbar-collapse.in, .navbar-collapse.collapsing {
    overflow-y: visible;
}

Bootstrap applies the "collapsing" class as the menu collapses, then "in" once the collapse is complete. I hope this helps someone else.

I also have this problem.

see this: http://bootply.com/97248

  1. run it
  2. resize (make it smaller) browser window until it become mobile layout
  3. open dropdown menu (don't close/collapse it back)
  4. resize (make it bigger) browser window until it become desktop layout
  5. you'll see the dropdown menu got vertical scrollbar

it's because the parent (#test in my example) still got 'in' class from when it's still mobile layout.

.navbar-collapse.in {
    overflow-y: auto;
}

is it bug or by bootstrap design? Anyone know where to fix this in bootstrap.js?

EDIT : thx Skelly! can't upvote/comment.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!