Chizindikiro chogwiritsidwa ntchito pochenjeza kuwonetsa kuti ndi uthenga wolakwika, wokhala ndi .sr-onlymawu owonjezera kuti apereke chidziwitso kwa ogwiritsa ntchito matekinoloje othandizira.
Cholakwika:Lowetsani imelo adilesi yolondola
Zotsitsa
Zosintha, menyu wanthawi zonse kuti muwonetse mndandanda wamaulalo. Zapangidwa kuti zizitha kulumikizana ndi pulogalamu yowonjezera ya JavaScript .
Chitsanzo
Mangirirani choyambitsa chotsitsa ndi menyu yotsitsa mkati mwa .dropdown, kapena chinthu china chomwe chimalengeza position: relative;. Kenako onjezani HTML ya menyu.
Mwachikhazikitso, menyu yotsitsa imayikidwa 100% kuchokera pamwamba ndi kumanzere kwa kholo lake. Onjezani .dropdown-menu-rightku a .dropdown-menukulumikiza kumanja menyu yotsitsa.
Zingafune kuyimitsidwa kowonjezera
Zotsitsa zimangoyimitsidwa kudzera pa CSS mkati mwamayendedwe anthawi zonse a chikalatacho. Izi zikutanthauza kuti zotsikirako zitha kudulidwa ndi makolo omwe ali ndi overflowkatundu wina kapena kuwonekera kunja kwa malo owonera. Yang'anirani nokha zovuta izi zikabuka.
Kuyanjanitsa .pull-rightkosiyidwa
Pofika pa v3.1.0, tasiya .pull-rightmindandanda yotsitsa. Kuti mugwirizane ndi menyu kumanja, gwiritsani ntchito .dropdown-menu-right. Zigawo za nav zoyanika kumanja mu navbar zimagwiritsa ntchito mtundu wa mixin wa kalasi iyi kuti zigwirizane ndi menyu. Kuti muchepetse, gwiritsani ntchito .dropdown-menu-left.
Mitu
Onjezani mutu kuti mulembe magawo a zochita mu menyu yotsikira.
Gwirizanitsani mabatani angapo pamzere umodzi ndi gulu la batani. Onjezani pa wayilesi ya JavaScript yosankha komanso mawonekedwe a bokosi loyang'ana ndi mabatani athu owonjezera .
Zida & popovers m'magulu a mabatani amafunikira masinthidwe apadera
Pangani gulu la mabatani kutambasula molingana ndi kukula kwake konse kwa kholo lake. Imagwiranso ntchito ndikutsitsa mabatani mkati mwa gulu la batani.
Kusamalira malire
Chifukwa cha HTML ndi CSS yeniyeni yomwe imagwiritsidwa ntchito kutsimikizira mabatani (omwe ndi display: table-cell), malire pakati pawo amawirikiza kawiri. M'magulu okhazikika a batani, margin-left: -1pxamagwiritsidwa ntchito kuyika malire m'malo mowachotsa. Komabe, marginsizigwira ntchito ndi display: table-cell. Zotsatira zake, kutengera makonda anu ku Bootstrap, mungafune kuchotsa kapena kukongoletsanso malire.
IE8 ndi malire
Internet Explorer 8 sipereka malire pamabatani mu gulu lovomerezeka, kaya ndi pa <a>kapena <button>zinthu. Kuti muchite izi, sungani batani lililonse mumzere wina .btn-group.
Pangani ma tabo kapena mapiritsi mosavuta m'lifupi mwa makolo awo pazithunzi zazikulu kuposa 768px ndi .nav-justified. Pazithunzi zazing'ono, maulalo a nav amasungidwa.
Maulalo ovomerezeka a navbar sakuthandizidwa pakadali pano.
Safari ndi omvera olungamitsidwa navs
Pofika pa v9.1.2, Safari ikuwonetsa cholakwika momwe kusinthira kukula kwa msakatuli wanu mopingasa kumayambitsa zolakwika mu nav yovomerezeka yomwe imachotsedwa pakutsitsimutsa. Vutoli likuwonetsedwanso mu chitsanzo cholungamitsidwa cha nav .
Navbars ndi zigawo zomvera za meta zomwe zimagwira ntchito ngati mitu yakusaka pa pulogalamu yanu kapena tsamba lanu. Amayamba kugwa (ndipo amatha kusinthika) pamawonekedwe am'manja ndikukhala opingasa pomwe kukula kwa malo owonera kumachulukira.
Maulalo ovomerezeka a navbar sakuthandizidwa pakadali pano.
Zosefukira
Popeza Bootstrap sadziwa kuchuluka kwa zomwe zili mu navbar yanu zimafuna, mutha kukumana ndi zovuta zomwe zikukulitsidwa pamzere wachiwiri. Kuti muthetse izi, mutha:
Chepetsani kuchuluka kapena m'lifupi mwa zinthu za navbar.
Sinthani malo omwe navbar yanu imasinthira pakati pa kugwa ndi kopingasa. Sinthani makonda @grid-float-breakpointanu osinthika kapena onjezani funso lanu lazama media.
Imafunika pulogalamu yowonjezera ya JavaScript
Ngati JavaScript yazimitsidwa ndipo malo owonera ndi opapatiza moti navbar ikugwa, sikungatheke kukulitsa navbar ndikuwona zomwe zili mkati mwa .navbar-collapse.
Navbar yomvera imafuna kuti pulogalamu yowonjezera ikhale yophatikizidwa mu mtundu wanu wa Bootstrap.
Kusintha malo ophwanyika a navbar
Navbar imagwera m'mawonekedwe ake oyimilira pomwe malo owonera ndi ochepera kuposa @grid-float-breakpoint, ndikumakula mpaka mawonekedwe ake opingasa osakhala a foni yam'manja pomwe malo owonera ali @grid-float-breakpointm'lifupi mwake. Sinthani kusinthaku mu gwero Laling'ono kuti muwongolere pomwe navbar ikugwa/kukula. Mtengo wokhazikika ndi 768px(chithunzi chaching'ono "chochepa" kapena "piritsi").
Pangani ma navbar kupezeka
Onetsetsani kuti mukugwiritsa ntchito <nav>chinthu kapena, ngati mukugwiritsa ntchito chinthu chodziwika bwino monga a <div>, onjezani a role="navigation"pa navbar iliyonse kuti muwonetsere kuti ndi gawo lodziwika bwino kwa ogwiritsa ntchito matekinoloje othandizira.
Chithunzi chamtundu
Sinthani mtundu wa navbar ndi chithunzi chanu posinthana mawu ndi <img>. Popeza .navbar-brandili ndi padding ndi kutalika kwake, mungafunike kupitilira CSS ina kutengera chithunzi chanu.
Makalasi awa ndi mitundu ya mixin-ed.pull-left ndi .pull-right, koma amafunsidwa mafunso atolankhani kuti azitha kuwongolera mosavuta zigawo za navbar pamitundu yonse yazida.
Kumanja kulumikiza zigawo zingapo
Ma Navbar pakadali pano ali ndi malire ndi angapo.navbar-right makalasi angapo. Kuti danga bwino, timagwiritsa ntchito malire olakwika pa .navbar-rightchinthu chomaliza. Pakakhala zinthu zingapo zogwiritsa ntchito kalasi imeneyo, mitsinje iyi sigwira ntchito momwe amafunira.
Tidzawonanso izi tikatha kulembanso gawoli mu v4.
Zokhazikika pamwamba
Onjezani .navbar-fixed-topndikuphatikiza a .containerkapena .container-fluidpakati ndi pad navbar.
Onetsetsani kuti mukuphatikiza izi pambuyo pa core Bootstrap CSS.
Static pamwamba
Pangani navbar yotalikirapo yomwe imachoka ndi tsambalo powonjezera .navbar-static-topndikuphatikiza a .containerkapena .container-fluidpakati ndi pad navbar.
Mosiyana ndi .navbar-fixed-*makalasi, simuyenera kusintha padding pa body.
Navbar yotembenuzidwa
Sinthani mawonekedwe a navbar powonjezera .navbar-inverse.
Zinyenyeswazi za mkate
Onetsani komwe tsamba ili mkati mwa kalozera wapanyanja.
Olekanitsa amawonjezedwa mu CSS kudzera :beforendi content.
Kusindikiza kosavuta kouziridwa ndi Rdio, koyenera kwa mapulogalamu ndi zotsatira zosaka. Chotchinga chachikulu ndi chovuta kuphonya, chiwonjezeke mosavuta, ndipo chimapereka malo akulu odina.
Kulemba chigawo cha pagination
Chigawo cha pagination chiyenera kukulungidwa mu <nav>chinthu kuti chizizindikiritse ngati gawo la navigation kuti muwone owerenga ndi matekinoloje ena othandizira. Kuphatikiza apo, popeza tsamba liyenera kukhala ndi magawo opitilira amodzi otere (monga mayendedwe oyambira pamutu, kapena kusakatula kwapambali), ndikofunikira kupereka kufotokozera aria-labelkomwe <nav>kukuwonetsa cholinga chake. Mwachitsanzo, ngati chigawo cha pagination chikugwiritsidwa ntchito poyang'ana pakati pa zotsatira zakusaka, chizindikiro choyenera chikhoza kukhala aria-label="Search results pages".
Kupereka zovuta kumatha kubwera mukakhala ndi zolemba zambiri zam'mizere mkati mwa chidebe chopapatiza, chilichonse chili ndi zake inline-block(monga chithunzi). Njira yozungulira iyi ndikukhazikitsa display: inline-block;. Kuti muwone nkhani ndi chitsanzo, onani #13219 .
Mabaji
Onetsani mosavuta zinthu zatsopano kapena zosawerengeka powonjezera <span class="badge">maulalo, ma navs a Bootstrap, ndi zina zambiri.
Wonjezerani dongosolo la gridi ya Bootstrap ndi gawo lazithunzi kuti muwonetse zithunzi, makanema, zolemba, ndi zina zambiri.
Ngati mukuyang'ana mawonekedwe a Pinterest a tizithunzi tating'ono tosiyanasiyana ndi/kapena m'lifupi, muyenera kugwiritsa ntchito pulogalamu yowonjezera ya chipani chachitatu monga Masonry , Isotope , kapena Salvattore .
Chitsanzo chosasinthika
Mwachikhazikitso, zikwangwani za Bootstrap zidapangidwa kuti ziziwonetsa zithunzi zolumikizidwa zomwe zili ndi zolembera zochepa.
Zomwe zili mwamakonda
Powonjezera pang'ono, ndizotheka kuwonjezera mtundu uliwonse wazinthu za HTML monga mitu, ndime, kapena mabatani pazithunzi.
Chizindikiro chazithunzi
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id ili si mi porta gravida ndi eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id ili si mi porta gravida ndi eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id ili si mi porta gravida ndi eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Perekani ndemanga zaposachedwa za momwe ntchito ikuyendetsedwera kapena zochita ndi mipiringidzo yosavuta koma yosinthika.
Kugwirizana kwa msakatuli
Mipiringidzo yopita patsogolo imagwiritsa ntchito kusintha kwa CSS3 ndi makanema ojambula kuti akwaniritse zina mwazotsatira zake. Izi sizikugwiritsidwa ntchito mu Internet Explorer 9 ndi m'munsimu kapena mitundu yakale ya Firefox. Opera 12 sichirikiza makanema ojambula.
Masitayelo azinthu zopangira mitundu yosiyanasiyana yazigawo (monga ndemanga zamabulogu, ma Tweets, ndi zina) zomwe zimakhala ndi chithunzi cholowera kumanzere kapena kumanja motsatira zolemba.
Media yosasinthika
Makanema osasinthika amawonetsa chinthu chapa media (zithunzi, makanema, zomvera) kumanzere kapena kumanja kwa block block.
Mutu wa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis mu faucibus.
Mutu wa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis mu faucibus.
Mutu wankhani wapa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis mu faucibus.
Mutu wa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis.
Mutu wa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis.
Maphunzirowa .pull-leftkomanso .pull-rightalipo ndipo adagwiritsidwa ntchito kale ngati gawo lazofalitsa, koma adasiya kugwiritsidwa ntchito ngati v3.3.0. Zili pafupifupi zofanana ndi .media-leftndi .media-right, kupatula zomwe .media-rightziyenera kuikidwa pambuyo .media-bodypa html.
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis mu faucibus.
Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Media yolumikizana pakati
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis mu faucibus.
Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Media yolumikizidwa pansi
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis mu faucibus.
Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Media list
Ndizowonjezera pang'ono, mutha kugwiritsa ntchito media mkati mwa mndandanda (zothandiza pamindandanda yankhani kapena mindandanda).
Mutu wa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis.
Mutu wankhani wapa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis.
Mutu wankhani wapa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis.
Mutu wankhani wapa media
Cras sit amet nibh libero, mu gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum mu vulputate at, tempus viverra turpis.
Lembani gulu
Magulu a mndandanda ndi chinthu chosinthika komanso champhamvu chowonetsera osati mndandanda wazinthu zosavuta, koma zovuta zomwe zili ndi chikhalidwe.
Chitsanzo choyambirira
Gulu la mndandanda wofunikira kwambiri ndi mndandanda wosasankhidwa wokhala ndi mndandanda wazinthu, ndi makalasi oyenera. Mangani pa izo ndi zosankha zomwe zikutsatira, kapena CSS yanu ngati pakufunika.
Cras justo odio
Dapibus ac facilisis in
Mowa lero
Porta ac consectetur ac
Vestibulum ndi eros
Mabaji
Onjezani gawo la mabaji pagulu lililonse la gulu ndipo liziyika kumanja.
14Cras justo odio
2Dapibus ac facilisis in
1Mowa lero
Zinthu zogwirizana
Lumikizani mndandanda wazinthu zamagulu pogwiritsa ntchito ma tag a nangula m'malo mwa mndandanda wazinthu (zomwe zikutanthauzanso kholo <div>m'malo mwa <ul>). Palibe chifukwa cha makolo payekha kuzungulira chinthu chilichonse.
Zina zokhazikika pano. Nulla vitae elit libero, pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu lero quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.
Phatikizani mosavuta magulu amndandanda amtundu uliwonse mkati mwa gulu lililonse.
Mutu wapagulu
Zina zokhazikika pano. Nulla vitae elit libero, pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu lero quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio
Dapibus ac facilisis in
Mowa lero
Porta ac consectetur ac
Vestibulum ndi eros
Kuyika momvera
Lolani asakatuli kuti azindikire kukula kwa kanema kapena chiwonetsero chazithunzi kutengera kukula kwa chipika chake popanga chiŵerengero chapadera chomwe chidzakula bwino pa chipangizo chilichonse.
Malamulo akugwiritsidwa ntchito mwachindunji ku <iframe>, <embed>, <video>, ndi <object>zinthu; mwasankha gwiritsani ntchito gulu la mbadwa .embed-responsive-itempamene mukufuna kufanana ndi masitayelo a zina.
Pro-Tip! Simufunikanso kuphatikizira frameborder="0"m'mabuku anu <iframe>momwe timakuchotserani.
Zitsime
Chokhazikika bwino
Gwiritsani ntchito chitsime ngati chosavuta pa chinthu kuti chiwonekere.
Taonani, ndili pachitsime!
Maphunziro osankha
Control padding ndi ngodya zozungulira ndi makalasi awiri osankha osintha.