I am using Bootstrap 4 and have navigation with horizontal items on my page. On small devices this menu collapses and menu items are still in horizontal line. What should I do to change it to vertical so items are one per each line?
相关问题
- How can I create this custom Bottom Navigation on
- How to add a “active” class to a carousel first el
- onSupportNavigateUp() function not working?
- Full Clickable Accordion in Bootstrap
- How to add Bootstrap 4 without Tether?
相关文章
- Make Bootstrap tab Active on the bases of URL link
- Rails: Twitter Bootstrap Buttons when visited get
- Reduce spacing between rows
- How do use bootstrap tooltips with React?
- Need to design 8 boxes in two rows
- Add selected attribute to option in select menu wi
- Bootstrap input field inside tooltip popover remov
- Trigger a Bootstrap .collapse('toggle') vi
For Bootstrap 4, the breakpoints have changed. You should override the navbar CSS like this if you want it to be vertical on small screens:
Demo http://codeply.com/go/Ar1H2G4JVH
Note: The @media query max-width should be adjusted accordingly for the
navbar-toggleable-*
class used in the navbar.UPDATE: The extra CSS is no longer needed as of Bootstrap 4 Alpha 6 since the navbar will stack vertically: http://www.codeply.com/go/cCZz5CsMcD