Bootstrap-a navigation header chak tak, chhanna pe thei, navbar atana documentation leh entirnan. Branding, navigation leh a dangte support a keng tel a, kan collapse plugin support pawh a tel bawk.
A hnathawh dan
Navbar i hman tan hmaa i hriat tur chu hetiang hi a ni:
Navbars hian responsive collapsing leh color scheme class hrang hrang atan wrapping .navbarwith a mamawh a..navbar-expand{-sm|-md|-lg|-xl}
Navbar leh a chhunga thil awmte hi default-in fluid a ni. An horizontal width tihtlem nan optional container hmang ang che .
Navbar chhunga spacing leh alignment control nan kan spacing leh flex utility class te hmang rawh.
Navbars hi default-in a chhang thei a, mahse chu chu i thlak danglam theih nan awlsam takin i siam danglam thei bawk. Responsive behavior hi kan Collapse JavaScript plugin ah a innghat a ni.
Navbar te hi print laiin default in a thup thin. Print turin nawr luih tir la .d-print, .navbar. Display utility class chu en rawh .
Element hmangin accessibility ensure <nav>emaw, a ang chi element generic zawk hman a nih chuan navbar tinah <div>a dah belh la, assistive technology hmangtute tan landmark region anga chiang taka hriat theih nan.role="navigation"
.collapse.navbar-collapseparent breakpoint hmanga navbar contents group leh thup nan.
Hetah hian responsive light-themed navbar-a sub-component awm zawng zawng entir nan kan rawn tarlang e, chu chu lg(large) breakpoint-ah automatic-in a collapse vek a ni.
He entirnan hian color ( bg-light) leh spacing ( my-2, my-lg-0, mr-sm-0, my-sm-0) utility class te a hmang a.
Chhinchhiah
The hi .navbar-brandelement tam zawkah hman theih a ni a, mahse anchor hian a thawk tha ber a, element thenkhatah chuan utility class emaw custom style emaw a mamawh thei a ni.
Image-a dah belh tur .navbar-brandchuan custom style emaw utilities emaw a mamawh reng mai thei a, chu chu a size dik tak a nih theih nan a ni. Entirnan entir tur thenkhat chu hetiang hi a ni.
Nav
Navbar navigation link te hian kan .navoption te hmangin anmahni modifier class hmangin an siam a, responsive styling dik tak neih nan toggler class hman a ngai a ni. Navbar-a navigation pawh a lo thang lian ang a, i navbar chhunga thu awmte chu him taka a inmil theih nan horizontal space a tam thei ang ber luah turin a pung ang.
Active states—with .active—to indicate the current page chu .nav-links emaw an nu leh pa hnai ber s emaw hnenah direct-in hman theih a .nav-itemni.
Tin, kan navs atan class kan hman avangin i duh chuan list-based approach hi i pumpelh vek thei bawk.
I navbar nav ah dropdown te pawh i hmang thei bawk. Dropdown menu-ah hian positioning atan wrapping element a ngai a, chuvangin a hnuaia tarlan ang hian element hrang hrang leh nested element hmang ngei ang che .nav-item..nav-link
Form hrang hrang
Navbar chhungah form control leh component hrang hrang dah la, .form-inline.
Immediate children elements in .navbaruse flex layout leh default ah a awm ang justify-content: space-between. Hetiang thiltih hi siamrem nan a tul angin flex utility dang hmang bawk ang che .
Input group te pawhin hna an thawk a:
Heng navbar form hrang hrangah hian button hrang hrang a support bawk. Hei hi vertical alignment utilities hmangin element size hrang hrang align theih a nih thu pawh hriat nawn tirtu ropui tak a ni.
Thumal
Navbars ah hian bits of text a awm thei a, chu chu .navbar-text. He class hian text string hrang hrangte tan vertical alignment leh horizontal spacing a siamrem thin.
A tul angin component leh utility dang nen mix leh match rawh.
Color scheme hrang hrang te
background-colorTheming class leh utilities te inzawmkhawm avang hian navbar theming hi a awlsam ngai lo . .navbar-lightBackground rawng eng tak tak nena hman tur, a nih loh leh background rawng dum nena hman tur atang hian thlang rawh .navbar-dark. .bg-*Tichuan, utilities hmangin customize rawh.
Container te pawh a awm
.containerA ngai lo nain , page pakhata center turin navbar chu a chhungah i wrap thei a, a chhungah pakhat i dah belh thei bawk a, fixed emaw static top navbar chhunga thu awmte chauh center turin i dah thei bawk.
.navbar-expand{-sm|-md|-lg|-xl}Container chu i navbar chhunga a awm chuan a horizontal padding chu i class tarlan aia breakpoint hniam zawkah a chhuak thin. Hei hian i navbar a collaps laiin lower viewport-ah a tul lo taka padding kan doubling lo tih a tichiang a ni.
Hmun dahna tur
Kan position utilities hmangin navbar te chu non-static position ah dah rawh. Fixed to the top, fixed to the bottom, or stickied to the top atang hian thlang rawh (page chu a chung a thlen thlengin a scroll a, chutah chuan a awm reng ang). Fixed navbars use position: fixed, chu chu DOM-a normal flow atanga lak chhuah an ni tihna a ni a, element dangte nena overlap loh nan custom CSS (eg, padding-topon the ) a mamawh thei bawk.<body>
Navbars hian .navbar-toggler, .navbar-collapse, leh .navbar-expand{-sm|-md|-lg|-xl}class te hmangin an content chu button hnung lama a collapse chuan a thlak danglam thei a ni. Utility dang nena inzawm chuan awlsam takin element bikte engtikah nge i lantir dawn emaw, i thup dawn emaw tih i thlang thei a ni.
Navbar collap ngai lo tan chuan .navbar-expandnavbar ah class kha add la. .navbar-expandNavbar collapse fo thin tan chuan class engmah add suh .
Toggler a ni
Navbar togglers te hi default-in left-aligned an ni a, mahse sibling element ang chi an zawm a nih chuan .navbar-brandright right-ah automatic-in an align ang. I markup reverse chuan toggler dahna chu a reverse ang. A hnuaia tarlan te hi toggle style hrang hrang entir a ni.
.navbar-brandBreakpoint hniam ber ah a lang lo :
A vei lamah brand hming a lang a, ding lamah toggler a awm bawk:
Vei lamah toggler leh dinglamah brand name awmin:
Pawn lam thil awmte
A châng chuan collapse plugin hmangin page hmun danga thup awmte chu trigger i duh ṭhin. Kan plugin hian idand data-targetmatching ah hna a thawh avangin chu chu awlsam takin a ti thei!