Bootstrap 简明教程
Bootstrap - Navigation Demo
What is a navbar?
Bootstrap 导航栏是一个在网页顶部响应式的导航标题。它可以基于屏幕尺寸进行展开或折叠,为网站提供用户友好的导航体验。
The Bootstrap navbar is a responsive navigation header at the top of a webpage. It can expand or collapse based on the screen size, providing a user-friendly navigation experience for websites.
Bootstrap 提供内置 CSS 类来创建标准导航栏。
Bootstrap provides built-in CSS classes to create a standard navigation bar.
-
The .navbar class is used to create a navigation bar component.
-
The .navbar-brand class represents the brand or logo of the website or application.
-
The .navbar-collapse class makes the navigation menu collapse into a dropdown or toggle button.
-
The .navbar-nav class is used to create a horizontal navigation menu with multiple navigation links or items.
-
The .nav-item class should be applied to each list item (<li>) within the navigation bar.