Bootstrap 导航组件


片剂和药丸

Class Description Example
.nav nav-tabs Creates navigation tabs 尝试一下
.nav nav-pills Creates navigation pills 尝试一下
.nav nav-pills nav-stacked Creates vertical navigation pills 尝试一下
.nav-justified Makes navigation tabs/pills equal widths of their parent, at screens wider than 768px. On smaller screens, the nav tabs/pills are stacked 尝试一下
.disabled Indicates a disabled (unclickable) tab/pill 尝试一下
Navigation tabs with dropdown menu 尝试一下
Navigation pills with dropdown menu 尝试一下
.tab-content Together with .tab-pane and data-toggle="tab" (data-toggle="pill" for pills), it makes the tab/pill toggleable 尝试一下
.tab-pane Together with .tab-content and data-toggle="tab" (data-toggle="pill" for pills), it makes the tab/pill toggleable 尝试一下

导航栏

Class Description Example
.navbar Creates a navigation bar 尝试一下
.navbar-brand Added to a link or a header element inside the navbar to represent a logo or a header 尝试一下
.navbar-btn Vertically aligns a button inside a navbar 尝试一下
.navbar-collapse Collapses the navbar (hidden and replaced with a menu/hamburger icon on mobile phones and small tablets) 尝试一下
.navbar-default Creates a default navigation bar (light-grey background color) 尝试一下
.navbar-fixed-bottom Makes the navbar stay at the bottom of the screen (sticky/fixed) 尝试一下
.navbar-fixed-top Makes the navbar stay at the top of the screen (sticky/fixed) 尝试一下
.navbar-form Added to form elements inside the navbar to vertically center them (proper padding) 尝试一下
.navbar-header Added to a container element that contains the link/element that represent a logo or a header 尝试一下
.navbar-inverse Creates a black navigation bar (instead of light-grey) 尝试一下
.navbar-left Aligns nav links, forms, buttons, or text, in the navbar to the left 尝试一下
.navbar-link Styles an element to look like a link inside the navbar (anchors get proper padding and an underline on hover, while other elements like p or span gets a default hover effect - white color in an inversed navbar and a black color in a default navbar) 尝试一下
.navbar-nav Used on a <ul> container that contains the list items with links inside a navigation bar 尝试一下
.navbar-right Aligns nav links, forms, buttons, or text in the navbar to the right. 尝试一下
.navbar-static-top Removes left, top and right borders (rounded corners) from the navbar (default navbar has a gray border and a 4px border-radius by default)
.navbar-text Vertical align any elements inside the navbar that are not links (ensures proper padding) 尝试一下
.navbar-toggle Styles the button that should open the navbar on small screens. Often used together with three .icon-bar classes to indicate a toggleable menu icon (hamburger/bars) 尝试一下


面包屑导航和分页

Class Description Example
.breadcrumb Makes a breadcrumb 尝试一下
.pager Provides simple pagination links (Previous/Next) 尝试一下
.previous Aligns the .pager previous button to the left 尝试一下
.next Aligns the .pager next button to the right 尝试一下
.disabled Indicates an unclickable link 尝试一下
.pagination Provides pagination links 尝试一下
.pagination-lg Used together with the .pagination class to provide larger pagination links 尝试一下
.pagination-sm Used together with the .pagination class to provide smaller pagination links 尝试一下
.disabled Indicates an unclickable link 尝试一下
.active Indicates the current page 尝试一下

标签和徽章

Class Description Example
.label label-default Indicates a default grey label 尝试一下
.label label-primary Indicates a blue label of type "primary" 尝试一下
.label label-success Indicates a green label of type "success" 尝试一下
.label label-info Indicates a light blue label of type "info" 尝试一下
.label label-warning Indicates a yellow label of type "warning" 尝试一下
.label label-danger Indicates a red label of type "danger" 尝试一下
.badge Indicates new or unread items 尝试一下
.jumbotron Indicates a big box for calling extra attention to featured content or information 尝试一下
.jumbotron (extra) To let the .jumbotron box span the full width, and without rounded corners, place it outside the .container class 尝试一下