Kaum ob ntawm cov khoom siv rov siv tau yog tsim rau hauv Bootstrap los muab kev taw qhia, ceeb toom, popovers, thiab ntau ntxiv.
Ultra simplistic thiab minimally styled pagination tshwm sim los ntawm Rdio, zoo rau cov apps thiab tshawb nrhiav. Qhov loj thaiv yog ib qho nyuaj rau nco, yooj yim scalable, thiab muab loj nias qhov chaw.
Kev sib txuas yog customizable thiab ua hauj lwm nyob rau hauv ib tug xov tooj ntawm cov xwm txheej nrog rau cov chav kawm zoo. .disabled
rau unclickable links thiab .active
rau nplooj ntawv tam sim no.
Ntxiv ob qho ntawm ob chav kawm xaiv los hloov qhov kev sib tw ntawm kev sib txuas ntawm pagination: .pagination-centered
thiab .pagination-right
.
Lub default pagination tivthaiv yog hloov tau thiab ua haujlwm nyob rau hauv ib tug xov tooj ntawm variations.
qhwv hauv ib <div>
, pagination tsuas yog ib <ul>
.
- <div class = "pagination" >
- <ul>
- <li><a href = "#" > Prev </a></li>
- <li class = "active" >
- <a href="#"> 1 </a> _ _ _
- </li>
- <li><a href = "#" > 2 </a></li>
- <li><a href = "#" > 3 </a></li>
- <li><a href = "#" > 4 </a></li>
- <li><a href = "#" > Next </a></li>
- </ul>
- </div>
Cov tshuaj tivthaiv pager yog ib txheej txuas rau kev siv pagination yooj yim nrog lub teeb cim thiab txawm tias sib dua. Nws yog qhov zoo rau cov chaw yooj yim xws li blogs lossis cov ntawv xov xwm.
Pager links kuj siv cov .disabled
chav kawm dav dav los ntawm pagination.
Los ntawm lub neej ntawd, pager chaw txuas.
- <ul class = "pager" >
- <li>
- <a href="#"> Previous </a> _ _ _
- </li>
- <li>
- <a href="#"> Tom ntej </a> _ _
- </li>
- </ul>
Daim ntawv lo | Markup |
---|---|
Default | <span class="label">Default</span> |
Kev vam meej | <span class="label label-success">Success</span> |
Ceeb toom | <span class="label label-warning">Warning</span> |
Tseem ceeb | <span class="label label-important">Important</span> |
Cov ntaub ntawv | <span class="label label-info">Info</span> |
Rov qab | <span class="label label-inverse">Inverse</span> |
Cov paib yog cov khoom me me, yooj yim rau kev nthuav qhia qhov taw qhia lossis suav ntawm qee yam. Lawv feem ntau pom nyob rau hauv cov neeg siv email xws li Mail.app lossis ntawm cov ntawv xov tooj ntawm tes rau kev ceeb toom thawb.
Lub npe | Piv txwv | Markup |
---|---|---|
Default | 1 | <span class="badge">1</span> |
Kev vam meej | 2 | <span class="badge badge-success">2</span> |
Ceeb toom | 4 | <span class="badge badge-warning">4</span> |
Tseem ceeb | 6 | <span class="badge badge-important">6</span> |
Cov ntaub ntawv | 8 | <span class="badge badge-info">8</span> |
Rov qab | 10 | <span class="badge badge-inverse">10</span> |
Bootstrap muab lub teeb yuag, hloov tau yooj yim hu ua chav tsev hero los nthuav qhia cov ntsiab lus ntawm koj qhov chaw. Nws ua haujlwm zoo ntawm kev lag luam thiab cov ntsiab lus-hnyav qhov chaw.
Qhwv koj cov ntsiab lus hauv ib div
yam li ntawd:
- <div class = "hero-unit" >
- <h1> Lub taub hau </h1>
- <p> Tagline </p>
- <p>
- <a class = "btn btn-primary btn-large" >
- Kawm ntxiv
- </a>
- </p>
- </div>
Qhov no yog ib qho yooj yim hero unit, ib qho yooj yim jumbotron-style tivthaiv rau kev hu xov tooj ntxiv rau cov ntsiab lus tshwj xeeb lossis cov ntaub ntawv.
Lub plhaub yooj yim rau qhov h1
kom tsim nyog qhov chaw tawm thiab ntu ntu ntawm cov ntsiab lus ntawm nplooj ntawv. Nws tuaj yeem siv lub h1
neej ntawd small
, lub ntsiab lus thiab feem ntau lwm yam khoom (nrog rau cov qauv ntxiv).
- <div class = "page-header" >
- <h1> Piv txwv nplooj ntawv header </h1>
- </div>
Los ntawm lub neej ntawd, Bootstrap's thumbnails yog tsim los qhia cov duab txuas nrog tsawg kawg yuav tsum tau kos.
Nrog me ntsis ntawm cov cim ntxiv, nws muaj peev xwm ntxiv txhua hom HTML cov ntsiab lus xws li kab lus, kab lus, lossis cov nyees khawm rau hauv cov duab me.
Thumbnails (yav dhau .media-grid
los txog v1.4) yog qhov zoo rau daim phiaj duab lossis cov yeeb yaj kiab, cov duab tshawb nrhiav, cov khoom muag, cov ntaub ntawv, thiab ntau ntxiv. Lawv tuaj yeem yog cov ntawv txuas lossis cov ntsiab lus zoo li qub.
Thumbnail markup yog qhov yooj yim - ul
nrog ib tus lej ntawm li
cov ntsiab lus yog txhua yam uas yuav tsum tau ua. Nws kuj tseem hloov tau yooj yim, tso cai rau txhua hom ntsiab lus nrog me ntsis ntxiv cim los qhwv koj cov ntsiab lus.
Thaum kawg, cov duab thumbnails siv cov chav kawm kab sib chaws uas twb muaj lawm - zoo li .span2
lossis .span3
- rau kev tswj cov duab me me.
Raws li tau hais dhau los, qhov yuav tsum tau kos npe rau cov duab me me yog lub teeb thiab ncaj nraim. Nov yog saib ntawm qhov teeb tsa ua ntej rau cov duab txuas :
- <ul class = "thumbnails" >
- <li class = "span3" >
- <a href="#" class = "thumbnail"> _ _ _
- <img src = "https://placehold.it/260x180" alt = "" >
- </a>
- </li>
- ...
- </ul>
Rau kev cai HTML cov ntsiab lus hauv cov duab me, cov cim hloov me ntsis. Txhawm rau tso cai thaiv cov ntsiab lus nyob txhua qhov chaw, peb sib pauv qhov <a>
zoo <div>
li:
- <ul class = "thumbnails" >
- <li class = "span3" >
- <div class = "thumbnail" >
- <img src = "https://placehold.it/260x180" alt = "" >
- <h5> Thumbnail label </h5>
- <p> Tub Nuj Nplhaib txoj nkauj no... </p>
- </div>
- </li>
- ...
- </ul>
Nrog Bootstrap 2, peb tau simplified lub hauv paus chav kawm: .alert
tsis yog .alert-message
. Peb kuj tau txo qhov tsawg kawg nkaus uas yuav tsum tau kos npe - tsis <p>
yog yuav tsum tau los ntawm lub neej ntawd, tsuas yog sab nrauv <div>
.
Rau cov khoom siv ruaj khov dua nrog cov lej tsawg, peb tau tshem tawm qhov sib txawv saib rau kev ceeb toom thaiv, cov lus uas tuaj nrog ntau dua padding thiab feem ntau cov ntawv nyeem ntau dua. Cov chav kawm kuj tau hloov mus rau .alert-block
.
Bootstrap los nrog lub zoo jQuery plugin uas txhawb cov lus ceeb toom, ua rau lawv tshem tawm sai thiab yooj yim.
Qhwv koj cov lus thiab ib qho kev xaiv kaw icon hauv div nrog chav kawm yooj yim.
- <div class = "alert" >
- <button class = "kaw" data-dismiss = "alert" > × </button>
- <strong> Ceeb toom! </strong> Zoo tshaj koj tus kheej, koj tsis saib zoo heev.
- </div>
Tau taub hau! iOS pab kiag li lawm xav tau ib tug href="#"
rau kev tso tseg ntawm ceeb toom. Nco ntsoov suav nrog nws thiab cov ntaub ntawv tus cwj pwm rau thauj tog rau nkoj kaw icons. Xwb, koj tuaj yeem siv lub <button>
caij nrog cov ntaub ntawv tus cwj pwm, uas peb tau xaiv ua rau peb cov ntaub ntawv. Thaum siv <button>
, koj yuav tsum suav nrog type="button"
lossis koj cov ntawv yuav tsis xa tuaj.
Yooj yim txuas ntxiv cov lus ceeb toom tus qauv nrog ob chav kawm xaiv: .alert-block
rau ntau qhov padding thiab cov ntawv nyeem thiab .alert-heading
rau cov lus sib xws.
Qhov zoo tshaj plaws xyuas koj tus kheej, koj tsis zoo heev. Nulla vitae elit libero, pharetra auggue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
- <div class = "alert-block" >
- <a class = "kaw" data-dismiss = "alert" href = "#" > × </a>
- <h4 class = "alert-heading" > Ceeb toom! </h4>
- Best check koj tus kheej, koj tsis yog ...
- </div>
- <div class = "alert alert-error" >
- ...
- </div>
- <div class = "alert-success" >
- ...
- </div>
- <div class = "alert-info" >
- ...
- </div>
Default kev nce qib bar nrog ntsug gradient.
- <div class = "progress" >
- <div class = "bar"
- style = " width : 60 %; " ></div>
- </div>
Siv cov gradient los tsim cov nyhuv striped (tsis muaj IE).
- <div class = "progress-striped" >
- <div class = "bar"
- style = " width : 20 %; " ></div>
- </div>
Siv tus qauv kab txaij thiab ua rau nws (tsis muaj IE).
- <div class = "progress-striped
- active" >
- <div class = "bar"
- style = " width : 40 %; " ></div>
- </div>
Cov kab kev nce qib siv qee qhov tib lub pob thiab ceeb toom cov chav kawm rau cov qauv zoo ib yam.
Zoo ib yam li cov xim xim, peb muaj cov kab txaij sib txawv.
Kev nce qib bar siv CSS3 kev hloov pauv, yog li yog tias koj hloov kho qhov dav ntawm javascript, nws yuav hloov kho kom zoo.
Yog tias koj siv .active
chav kawm, koj .progress-striped
qhov kev kawm bar yuav ua rau cov kab txaij sab laug mus rau sab xis.
Cov kab nce qib siv CSS3 gradients, kev hloov pauv, thiab cov animations kom ua tiav tag nrho lawv cov teebmeem. Cov yam ntxwv no tsis txaus siab hauv IE7-9 lossis cov laus dua ntawm Firefox.
Opera thiab IE tsis txhawb cov animations nyob rau lub sijhawm no.
Siv lub qhov dej zoo li cov nyhuv yooj yim ntawm ib lub caij los muab nws cov nyhuv inset.
- <div class = "zoo" >
- ...
- </div>
Siv lub cim ze ze rau kev tso tawm cov ntsiab lus xws li modals thiab ceeb toom.
- <button class = "kaw" > × </button>
iOS pab kiag li lawm yuav tsum tau ib tug href="#" rau nias cov xwm txheej yog tias koj xav siv lub thauj tog rau nkoj.
- <a class = "kaw" href = "#" > × </a>