Swiphemu swo tala leswi nga tirhisiwaka nakambe leswi akiweke leswaku swi nyikela ku famba-famba, switsundzuxo, ku pover ni swin’wana.
Menyu leyi cinca-cincaka, leyi nga ni mongo yo kombisa minxaxamelo ya swihlanganisi. Yi endliwe yi tirhisana hi xiengetelo xa JavaScript lexi nga ehansi .
- <ul class = "menyu yo rhelela" role = "menyu" aria-labelledby = "Menyu yo rhelela" >
- <li><a tabindex = "-1" href = "#" > Xiendlo </a></li>
- <li><a tabindex = "-1" href = "#" > Xiendlo xin'wana </a></li>
- <li><a tabindex = "-1" href = "#" > Xin'wana laha </a></li>
- <li tlilasi = "xihambanisi" </li>
- <li><a tabindex = "-1" href = "#" > Xihlanganisi lexi hambanisiweke </a></li>
- </ul>
Loko hi languta ntsena menyu leyi nga ehansi, hi leyi HTML leyi lavekaka. U fanele ku phutsela xihlohloteri xa dropdown na menyu ya dropdown endzeni ka .dropdown
, kumbe elemente yin’wana leyi tivisa position: relative;
. Kutani u endla ntsena menyu.
- <div class = "xirhendzevutani xa le hansi" >
- <!-- Link kumbe button ku cinca-cinca dropdown -->
- <ul class = "menyu leyi nga ehansi" role = "menyu" aria-labelledby = "dLabel" >
- <li><a tabindex = "-1" href = "#" > Xiendlo </a></li>
- <li><a tabindex = "-1" href = "#" > Xiendlo xin'wana </a></li>
- <li><a tabindex = "-1" href = "#" > Xin'wana laha </a></li>
- <li tlilasi = "xihambanisi" </li>
- <li><a tabindex = "-1" href = "#" > Xihlanganisi lexi hambanisiweke </a></li>
- </ul>
- </div>
Lulamisa timenyu hi tlhelo ra xinene ivi u engetela ku katsa swiyimo leswi engetelekeke swa swilo leswi nga ehansi.
Engetela .pull-right
eka a .dropdown-menu
ku ya exineneni ringanisa menyu leyi nga ehansi.
- <ul class = "menyu leyi nga ehansi yi koka-exineneni" role = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
Engetela .disabled
eka a <li>
eka dropdown ku tshikisa xihlanganisi.
- <ul class = "menyu yo rhelela" role = "menyu" aria-labelledby = "Menyu yo rhelela" >
- <li><a tabindex = "-1" href = "#" > Xihlanganisi xa nkarhi na nkarhi </a></li>
- <li class = "disabled" ><a tabindex = "-1" href = "#" > Xihlanganisi lexi nga tirhiki </a></li>
- <li><a tabindex = "-1" href = "#" > Xihlanganisi xin'wana </a></li>
- </ul>
Engetelani mpimo lowu engetelekeke wa timenyu leti nga ehansi, leti humelelaka eka hover ku fana ni ta OS X, hi ku engeteriwa kun’wana ko olova ka ku fungha. Engetelani .dropdown-submenu
eka yin’wana na yin’wana li
eka menyu leyi nga kona leyi nga ehansi ya ku endla xitayili hi ku tisungulela.
- <ul class = "menyu leyi nga ehansi" role = "menyu" aria-labelledby = "dLabel" >
- ...
- <li class = "menyu ya le hansi-ya-tshama" >
- <a tabindex = "-1" href = "#" > Swihlawulekisi swin'wana </a>
- <ul class = "menyu leyi nga ehansi" >
- ...
- </ul>
- </li>
- </ul>
Ku olova ka mapheji loku hlohloteriweke hi Rdio, lokunene eka ti-app na mimbuyelo ya ku lavisisa. Xibokisana lexikulu xa tika ku xi hundza, xi olova ku xi ringanisiwa naswona xi nyika tindhawu letikulu to tsindziyela.
- <div class = "xiphemu xa mapheji" >
- <ul>
- <li><a href = "#" > Xifaniso xa le mahlweni </a></li>
- <li><a href = "#" > 1 Xihlamusela -marito xa Xitsonga
- <li><a href = "#" > 2 Xihlamusela -marito xa Xitsonga
- <li><a href = "#" > 3 Xihlamusela -marito xa Xitsonga
- <li><a href = "#" > 4 Xihlamusela -marito xa Xitsonga
- <li><a href = "#" > 5 </a></li> Xihlamusela-marito xa Xitsonga
- <li><a href = "#" > Lexi landzelaka </a></li>
- </ul>
- </div>
Swihlanganisi swi nga cinciwa hi ku ya hi swiyimo swo hambana-hambana. Tirhisa .disabled
eka swihlanganisi leswi nga tsindziyelangiki ni .active
ku kombisa tluka ra sweswi.
- <div class = "xiphemu xa mapheji" >
- <ul>
- <li class = "ku tsandzeka ku tirha" ><a href = "#" > « </a></li>
- <li tlilasi = "ntirho" ><a href = "#" > 1 </a></li>
- ...
- </ul>
- </div>
U nga ha cincana hi ku hlawula eka ti-anchor leti tirhaka kumbe leti nga tirhiki hi swipano ku susa ntirho wa ku tikhoma loko u ri karhi u hlayisa switayele leswi kunguhatiweke.
- <div class = "xiphemu xa mapheji" >
- <ul>
- <li class = "ku tsandzeka ku tirha" ><span> « </span></li>
- <li tlilasi = "ntirho" ><span> 1 </span></li>
- ...
- </ul>
- </div>
Xana u lava ku endla mapheji lamakulu kumbe lamatsongo? Engetela .pagination-large
, .pagination-small
, kumbe .pagination-mini
ku kuma tisayizi leti engetelekeke.
- <div class = "xiphemu xa pheji-xikulu" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "xiphemu xa mapheji" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "xiphemu xa pheji-xitsongo" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "xiphepherhele xa pheji-mini" >
- <ul>
- ...
- </ul>
- </div>
Engetela yin’wana ya titlilasi timbirhi leti nga hlawuriwa ku cinca ku ringanisiwa ka swihlanganisi swa mapheji: .pagination-centered
na .pagination-right
.
- <div class = "xiphemu xa mapheji lexi nga exikarhi ka mapheji" >
- ...
- </div>
- <div class = "xiphemu xa pheji-xinene" >
- ...
- </div>
Swihlanganisi swa xihatla swa le mahlweni na leswi landzelaka swa ku tirhisiwa ko olova ka mapheji hi ku fungha ku fungha na switayele. Swi kahle eka tisayiti to olova to fana na ti-blog kumbe timagazini.
Hi ku tiyimisela, pager yi hlanganisa swihlanganisi.
- <ul tlilasi = "pager" >
- <li><a href = "#" > Leswi hundzeke </a></li>
- <li><a href = "#" > Lexi landzelaka </a></li>
- </ul>
Handle ka sweswo, u nga ha ringanisa xihlanganisi xin’wana ni xin’wana ematlhelo:
- <ul tlilasi = "pager" >
- <li class = "ya khale" >
- <a href = "#" > Xihlamusela-marito xa Xitsonga; Vakulu </a>
- </li>
- <li class = "leyi landzelaka" >
- <a href = "#" > Swintshwa → </a>
- </li>
- </ul>
Swihlanganisi swa Pager swi tlhela swi tirhisa .disabled
tlilasi ya vukorhokeri byo angarhela ku suka eka pheji.
- <ul tlilasi = "pager" >
- <li class = "xilemo xa khale" >
- <a href = "#" > Xihlamusela-marito xa Xitsonga; Vakulu </a>
- </li>
- ...
- </ul>
Tilebhele | Ku fungha swilo |
---|---|
Ku tlula | <span class="label">Default</span> |
Humelela | <span class="label label-success">Success</span> |
Xilemukisi | <span class="label label-warning">Warning</span> |
Nkoka | <span class="label label-important">Important</span> |
Info | <span class="label label-info">Info</span> |
Ku hundzuluxela | <span class="label label-inverse">Inverse</span> |
Vito | Xikombiso | Ku fungha swilo |
---|---|---|
Ku tlula | 1. | <span class="badge">1</span> |
Humelela | 2. | <span class="badge badge-success">2</span> |
Xilemukisi | 4. | <span class="badge badge-warning">4</span> |
Nkoka | 6. | <span class="badge badge-important">6</span> |
Info | 8. | <span class="badge badge-info">8</span> |
Ku hundzuluxela | 10. | <span class="badge badge-inverse">10</span> |
Ku olova ku tirhisiwa, malebvu na tibeji swi ta wa ntsena (hi ku tirhisa :empty
xihlawulekisi xa CSS) loko ku nga ri na nhundzu leyi nga kona endzeni.
Xiphemu xo olova, lexi cinca-cincaka ku kombisa swilo swa nkoka eka sayiti ya wena. Yi tirha kahle eka tisayiti to xavisa na leti nga ni swilo swo tala.
Leyi i yuniti yo olova ya nhenha, xiphemu xo olova xa xitayili xa jumbotron xo vitana nyingiso lowu engetelekeke eka swilo leswi kombisiweke kumbe rungula.
- <div class = "nhenha-yuniti" >
- <h1> Nhlokomhaka </h1>
- <p> Nxaxamelo wa swifaniso </p>
- <p>
- <a tlilasi = "btn btn-btn-nkulu ya le henhla" >
- Dyondza swo tala
- </a>
- </p>
- </div>
Xikhegelo xo olova xa h1
ku veka swiphemu leswi faneleke swa nhundzu eka tluka. Yi nga tirhisa h1
's default small
, element xikan'we na swiphemu swin'wana swo tala (na switayele swo engetela).
- <div class = "nhlokomhaka ya pheji" >
- <h1> Xikombiso xa nhlokomhaka ya tluka <small> Tsalwa-ntsongo ra nhlokomhaka </small></h1>
- </div>
Hi ku tiyimisela, swifaniso leswitsongo swa Bootstrap swi endleriwe ku kombisa swifaniso leswi hlanganisiweke hi ku fungha lokutsongo loku lavekaka.
Hi ku markup nyana yo engetela, swa koteka ku engetela muxaka wihi na wihi wa swilo swa HTML ku fana na tinhlokomhaka, tindzimana, kumbe swikomba-nkarhi eka swifaniso leswitsongo.
Swifaniso leswitsongo (khale .media-grid
ku fikela eka v1.4) swi kahle swinene eka tigridi ta swifaniso kumbe tivhidiyo, mimbuyelo ya ku lavisisa swifaniso, swilo swa vuxavisi, tiphotifoliyo ni swin’wana swo tala. Swi nga va swihlanganisi kumbe swilo leswi nga cinciki.
Ku fungha swifaniso leswitsongo swa olova—a leyi ul
nga ni nhlayo yihi na yihi ya li
swiaki hi swona ntsena leswi lavekaka. Yitlhela yiva super flexible, yi pfumelela muxaka wihi na wihi wa swilo leswingana ntsena markup nyana ku phutsela swilo swa wena.
Xo hetelela, xiphemu xa swifaniso leswitsongo xi tirhisa titlilasi ta sisiteme ya gridi leti nga kona—ku fana na .span2
kumbe .span3
—ku lawula swipimelo swa swifaniso leswitsongo.
Hilaha swi boxiweke hakona eku sunguleni, xikombiso lexi lavekaka xa swifaniso leswitsongo xa olova naswona xi kongomile. Hi lowu ku languta eka xiyimiso xa xiviri xa swifaniso leswi hlanganisiweke :
- <ul class = "swifaniso leswitsongo" >
- <li tlilasi = "span4" >
- <a href = "#" class = "xifaniso lexitsongo" >
- <img data-src = "mukhomi.js/300x200" alt = "" >
- </a>
- </li>
- ...
- </ul>
Eka nhundzu ya HTML ya ntolovelo eka swifaniso leswitsongo, ku fungha ku cinca katsongo. Ku pfumelela block level content kun’wana na kun’wana, hi cincana the <a>
for a <div>
like so:
- <ul class = "swifaniso leswitsongo" >
- <li tlilasi = "span4" >
- <div class = "xifaniso lexitsongo" >
- <img data-src = "mukhomi.js/300x200" alt = "" >
- <h3> Lebula ya xifaniso lexitsongo </h3>
- <p> Xifaniso xa xifaniso lexitsongo... </p>
- </div>
- </li>
- ...
- </ul>
Hlawula hinkwaswo leswi u nga swi hlawulaka hi titlilasi to hambana ta gridi leti nga kona eka wena. U nga ha tlhela u hlanganisa ni ku fambisana ni tisayizi to hambana-hambana.
Pfuxeta tsalwa rihi na rihi na buti yo hlongola leyi nga hlawuriki eka .alert
rungula ra xitsundzuxo xa xisekelo.
- <div class = "xitsundzuxo" >
- < muxaka wa buti = "button" class = "pfala" data-dismiss = "xitsundzuxo" > × </button>
- <strong> Xitsundzuxo! </strong> Best check yo self, a wu languteki kahle ngopfu.
- </div>
Swihlamusela-marito swa Mobile Safari na Mobile Opera, ku engetela eka data-dismiss="alert"
xihlawulekisi, swi lava href="#"
ku hlongoriwa ka switsundzuxo loko ku tirhisiwa <a>
thegi.
- <a href = "#" class = "pfala" data-dismiss = "xitsundzuxo" > &minkarhi; </a>
Hi ndlela yin’wana, u nga tirhisa <button>
elemente leyi nga na xihlawulekisi xa data, lexi hi hlawuleke ku xi endla eka tidokisi ta hina. Loko u tirhisa <button>
, u fanele ku katsa type="button"
kutani tifomo ta wena ti nga ha rhumeli.
- < muxaka wa buti = "button" class = "pfala" data-dismiss = "xitsundzuxo" > × </button>
Tirhisa switsundzuxo swa jQuery plugin ku hatlisa no olova ku hlongola switsundzuxo.
Eka marungula yo leha, engetela padding ehenhla na le hansi ka xifunengeto xa xitsundzuxo hi ku engetela .alert-block
.
Best check yo self, a wu languteki kahle ngopfu. Nulla vitae elit libero, ku nga pharetra augue. Praesent commodo cursus magna, xihlala xa xirhendzevutani xa xirhendzevutani xa xirhendzevutani xa xirhendzevutani.
- <div class = "xitsundzuxo-xitiviso xa xitsundzuxo" >
- < muxaka wa buti = "button" class = "pfala" data-dismiss = "xitsundzuxo" > × </button>
- <h4> Xitsundzuxo! </h4>
- Best check yo self, a wu...
- </div>
Engetelani titlilasi to hlawula ku cinca nhlamuselo ya xitsundzuxo.
- <div class = "xitsundzuxo xa xitsundzuxo-xihoxo" >
- ...
- </div>
- <div class = "xitsundzuxo-ku humelela" >
- ...
- </div>
- <div class = "xitsundzuxo-xitsundzuxo-xitiviso" >
- ...
- </div>
Bar ya nhluvuko ya ntolovelo leyi nga ni xirhendzevutana lexi yimisiweke.
- <div class = "nhluvuko" >
- <div class = "bar" xitayili = " ku anama : 60 %; " ></div>
- </div>
Tirhisa gradient ku endla mbuyelo wa mitila. A swi kumeki eka IE7-8.
- <div class = "nhluvuko wa nhluvuko-striped" >
- <div class = "bar" xitayili = " ku anama : 20 %; " ></div>
- </div>
Engetela .active
eka .progress-striped
ku endla leswaku swirhendzevutana swi hanya hi xinene ku ya eximatsini. A swi kumeki eka tivhidiyo hinkwato ta IE.
- <div class = "nhluvuko wa nhluvuko-striped active" >
- <div class = "bar" xitayili = " ku anama : 40 %; " ></div>
- </div>
Veka tibara to tala eka yin’we .progress
leswaku u ti hlanganisa.
- <div class = "nhluvuko" >
- <div class = "bar bar-ku humelela" xitayili = " ku anama : 35 %; " ></div>
- <div class = "bar bar-xitsundzuxo" xitayili = " ku anama : 20 %; " ></div>
- <div class = "bar bar-khombo" xitayili = " ku anama : 10 %; " ></div>
- </div>
Tibara ta nhluvuko ti tirhisa tin’wana ta titlilasi ta buti leti fanaka ni ta xitsundzuxo eka switayele leswi nga cincekiki.
- <div class = "vuxokoxoko bya nhluvuko wa nhluvuko" >
- <div tlilasi = "bar" xitayili = " ku anama : 20 % " ></div>
- </div>
- <div class = "nhluvuko wa nhluvuko-ku humelela" >
- <div tlilasi = "bar" xitayili = " ku anama : 40 % " ></div>
- </div>
- <div class = "xitsundzuxo xa nhluvuko wa nhluvuko" >
- <div tlilasi = "bar" xitayili = " ku anama : 60 % " ></div>
- </div>
- <div class = "nhluvuko wa nhluvuko-khombo" >
- <div tlilasi = "bar" xitayili = " ku anama : 80 % " ></div>
- </div>
Ku fana ni mihlovo leyi tiyeke, hi ni swiphepherhele swo hambana-hambana swa nhluvuko leswi nga ni mitila.
- <div class = "nhluvuko nhluvuko-vuxokoxoko nhluvuko-striped" >
- <div tlilasi = "bar" xitayili = " ku anama : 20 % " ></div>
- </div>
- <div class = "nhluvuko wa nhluvuko-ku humelela nhluvuko-striped" >
- <div tlilasi = "bar" xitayili = " ku anama : 40 % " ></div>
- </div>
- <div class = "nhluvuko wa nhluvuko-xitsundzuxo xa nhluvuko-striped" >
- <div tlilasi = "bar" xitayili = " ku anama : 60 % " ></div>
- </div>
- <div class = "nhluvuko wa nhluvuko-khombo nhluvuko-striped" >
- <div tlilasi = "bar" xitayili = " ku anama : 80 % " ></div>
- </div>
Tibara ta nhluvuko ti tirhisa ti-gradient ta CSS3, ku cinca, na swifaniso leswi hanyaka ku fikelela switandzhaku swa swona hinkwaswo. Switirhisiwa leswi a swi seketeriwi eka IE7-9 kumbe vuhundzuluxeri bya khale bya Firefox.
Tivhidiyo ta khale ku tlula Internet Explorer 10 na Opera 12 a ti seketeli swifaniso leswi hanyaka.
Switayili swa swilo leswi nga twisisekiki swo aka tinxaka to hambana ta swiphemu (ku fana na mavonelo ya blog, Ti-Tweet, na swin’wana) leswi kombisaka xifaniso lexi ringanisiweke hi tlhelo ra ximatsi kumbe ra xinene etlhelo ka nhundzu ya matsalwa.
Midiya ya ntolovelo yi pfumelela ku papamala nchumu wa midiya (swifaniso, vhidiyo, mpfumawulo) eximatsini kumbe exineneni xa xibokisana xa nhundzu.
- <div class = "swihangalasamahungu" >
- <a class = "koka-ximatsi" href = "#" >
- <img class = "nchumu-wa-mahungu" data-src = "mukhomi.js/64x64" >
- </a>
- <div class = "miri wa vuhangalasi bya mahungu" >
- <h4 class = "media-heading" > Nhlokomhaka ya vuhangalasi bya mahungu </h4>
- ...
- <!-- Nchumu wa midiya lowu pfanganisiweke -->
- <div class = "swihangalasamahungu" >
- ...
- </div>
- </div>
- </div>
Hi ku markup nyana yo engetela, u nga tirhisa media endzeni ka nxaxamelo (leswi pfunaka eka tithread ta mavonelo kumbe minxaxamelo ya swihloko).
Cras tshama amet nibh libero, eka gravida nulla. Nulla vel metus scelerisque ya le mahlweni ka xitsonga. Cras purus odio, vestibulum eka vulputate eka, xihlahla xa xirhendzevutani.
- <ul class = "nxaxamelo wa swihangalasamahungu" >
- <li tlilasi = "swihangalasamahungu" >
- <a class = "koka-ximatsi" href = "#" >
- <img class = "nchumu-wa-mahungu" data-src = "mukhomi.js/64x64" >
- </a>
- <div class = "miri wa vuhangalasi bya mahungu" >
- <h4 class = "media-heading" > Nhlokomhaka ya vuhangalasi bya mahungu </h4>
- ...
- <!-- Nchumu wa midiya lowu pfanganisiweke -->
- <div class = "swihangalasamahungu" >
- ...
- </div>
- </div>
- </li>
- </ul>
Tirhisa xihlovo tani hi mbuyelo wo olova eka elemente ku yi nyika mbuyelo wa inset.
- <div tlilasi = "kahle" >
- ...
- </div>
Lawula padding na tikhoneni ta xirhendzevutani na titlilasi timbirhi ta modifier leti nga hlawuriwa.
- <div class = "kahle kahle-nkulu" >
- ...
- </div>
- <div class = "kahle kahle-switsongo" >
- ...
- </div>
Tirhisa xifaniso xa ku pfala xa generic ku bakanya swilo swo fana na ti modals na switsundzuxo.
- <button class = "pfala" > &minkarhi; </button>
Switirhisiwa swa iOS swi lava href="#"
swiendlakalo swa for click loko u tsakela ku tirhisa anchor.
- <a tlilasi = "pfala" href = "#" > &minkarhi; </a>
Titlilasi to olova, leti kongomisiweke ta nkombiso lowutsongo kumbe ku cinca-cinca ka mahanyelo.
Float element leyi nga eximatsini
- class = "koka-ximatsi".
- . koka - ximatsi { .
- float : ximatsi ;
- } .
Phaphama elemente hi xinene
- class = "ku koka-exineneni".
- . koka - xinene { .
- float : xinene ;
- } .
Cinca muvala wa elemente ku ya eka#999
- class = "ku miyetiwa".
- . muted { .
- muvala : #999;
- } .
Hlawula the float
eka elemente yihi na yihi
- class = "xihlamusela-marito".
- . ku lulamisa ku basisa { .
- * ku kurisa : 1 ;
- &: emahlweni ka , .
- &: endzhaku ka { .
- nkombiso : tafula ;
- leswi nga endzeni : "" ;
- } .
- &: endzhaku ka { .
- erivaleni : havumbirhi bya swona ;
- } .
- } .