Kaum ob ntawm cov khoom siv rov siv tau tsim los muab kev taw qhia, ceeb toom, popovers, thiab ntau dua.
Toggleable, contextual menu rau displaying lists links. Ua kev sib tham nrog lub dropdown JavaScript plugin .
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Action </a></li>
- <li><a tabindex = "-1" href = "#" > Lwm yam </a></li>
- <li><a tabindex = "-1" href = "#" > Lwm yam ntawm no </a></li>
- <li class = "divider" ></li>
- <li><a tabindex = "-1" href = "#" > sib cais </a></li>
- </ul>
Saib ntawm cov ntawv qhia zaub mov, ntawm no yog qhov yuav tsum tau HTML. Koj yuav tsum tau qhwv lub dropdown lub trigger thiab dropdown zaub mov nyob rau hauv .dropdown
, los yog lwm yam uas tshaj tawm position: relative;
. Tom qab ntawd tsuas yog tsim cov ntawv qhia zaub mov.
- <div class = "dropdown" >
- <!-- Txuas los yog khawm toggle dropdown -->
- <ul class = "dropdown-menu" role = "menu" aria-labeledby = "dLabel" >
- <li><a tabindex = "-1" href = "#" > Action </a></li>
- <li><a tabindex = "-1" href = "#" > Lwm yam </a></li>
- <li><a tabindex = "-1" href = "#" > Lwm yam ntawm no </a></li>
- <li class = "divider" ></li>
- <li><a tabindex = "-1" href = "#" > sib cais </a></li>
- </ul>
- </div>
Teem cov ntawv qhia zaub mov rau sab xis thiab ntxiv suav nrog cov theem ntxiv ntawm kev poob qis.
Ntxiv .pull-right
rau .dropdown-menu
txoj cai dlhos cov ntawv qhia zaub mov.
- <ul class = "dropdown-menu pull-right" role = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
Ntxiv .disabled
rau ib qho <li>
hauv dropdown kom lov tes taw qhov txuas.
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Kev sib txuas tsis tu ncua </a></li>
- <li class = "disabled" ><a tabindex = "-1" href = "#" > Disabled link </a></li>
- <li><a tabindex = "-1" href = "#" > Lwm qhov txuas </a></li>
- </ul>
Ntxiv ib theem ntxiv ntawm dropdown menus, tshwm nyob rau hover zoo li cov OS X, nrog rau ib co yooj yim markup ntxiv. Ntxiv .dropdown-submenu
rau ib qho twg li
hauv cov ntawv qhia zaub mov uas twb muaj lawm rau qhov tsis siv neeg styling.
- <ul class = "dropdown-menu" role = "menu" aria-labeledby = "dLabel" >
- ...
- <li class = "dropdown-submenu" >
- <a tabindex = "-1" href = "#"> Ntau txoj kev xaiv </a>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
Yooj yim 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.
- <div class = "pagination" >
- <ul>
- <li><a href = "#" > Prev </a></li>
- <li><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 = "#" > 5 </a></li>
- <li><a href = "#" > Next </a></li>
- </ul>
- </div>
Cov ntawv txuas yog customizable rau ntau qhov xwm txheej. Siv .disabled
rau unclickable links thiab .active
qhia cov nplooj ntawv tam sim no.
- <div class = "pagination" >
- <ul>
- <li class = "disabled" ><a href = "#" > « </a></li>
- <li class = "active" ><a href = "#" > 1 </a></li>
- ...
- </ul>
- </div>
Koj tuaj yeem xaiv hloov pauv cov khoom siv lossis cov neeg xiam oob khab rau spans kom tshem tawm cov haujlwm nyem thaum tuav cov hom phiaj xav.
- <div class = "pagination" >
- <ul>
- <li class = "disabled" ><span> « </span></li>
- <li class = "active" ><span> 1 </span></li>
- ...
- </ul>
- </div>
Xav kom loj dua lossis me dua pagination? Ntxiv .pagination-large
, .pagination-small
, lossis .pagination-mini
rau qhov ntau thiab tsawg.
- <div class = "pagination pagination-loj" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-small" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-mini" >
- <ul>
- ...
- </ul>
- </div>
Ntxiv ib qho ntawm ob chav kawm xaiv los hloov cov kev sib raug zoo ntawm kev sib txuas ntawm pagination: .pagination-centered
thiab .pagination-right
.
- <div class = "pagination pagination-centered" >
- ...
- </div>
- <div class = "pagination pagination-right" >
- ...
- </div>
Kev sib txuas ceev dhau los thiab tom ntej rau kev siv pagination yooj yim nrog lub teeb cim thiab cov qauv. Nws yog qhov zoo rau cov chaw yooj yim xws li blogs lossis cov ntawv xov xwm.
Los ntawm lub neej ntawd, pager chaw txuas.
- <ul class = "pager" >
- <li><a href = "#" > Previous </a></li>
- <li><a href = "#" > Next </a></li>
- </ul>
Xwb, koj tuaj yeem kho txhua qhov txuas mus rau sab:
- <ul class = "pager" >
- <li class = "previous" >
- <a href="#"> & larr ; _ Laus </a>
- </li>
- <li class = "next" >
- <a href="#"> Tshiab & rarr ; </a>
- </li>
- </ul>
Pager txuas kuj tseem siv cov .disabled
chav kawm siv hluav taws xob dav dav los ntawm pagination.
- <ul class = "pager" >
- <li class = "previous disabled" >
- <a href="#"> & larr ; _ Laus </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> |
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> |
Rau kev siv tau yooj yim, cov ntawv sau thiab cov ntawv cim yuav tsuas vau (ntawm CSS tus :empty
xaiv) thaum tsis muaj cov ntsiab lus nyob hauv.
Lub teeb yuag, hloov tau yooj yim los qhia cov ntsiab lus tseem ceeb ntawm koj lub xaib. Nws ua haujlwm zoo ntawm kev lag luam thiab cov ntsiab lus-hnyav qhov chaw.
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.
- <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>
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 (nrog rau cov qauv ntxiv).
- <div class = "page-header" >
- <h1> Piv txwv nplooj ntawv header <small> Subtext rau header </small></h1>
- </div>
Los ntawm lub neej ntawd, Bootstrap's thumbnails yog tsim los nthuav 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-xws 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 = "span4" >
- <a href="#" class = "thumbnail"> _ _ _
- <img data-src = "holder.js/300x200" 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 = "span4" >
- <div class = "thumbnail" >
- <img data-src = "holder.js/300x200" alt = "" >
- <h3> Thumbnail label </h3>
- <p> Daim duab duab... </p>
- </div>
- </li>
- ...
- </ul>
Tshawb nrhiav tag nrho koj cov kev xaiv nrog ntau cov chav kawm kab sib chaws muaj rau koj. Koj tseem tuaj yeem sib xyaw thiab sib txawv qhov ntau thiab tsawg.
Qhwv cov ntawv nyeem thiab xaiv lub khawm tso tawm rau hauv .alert
cov lus ceeb toom ceeb toom.
- <div class = "alert" >
- <button type = "button" class = "kaw" data-dismiss = "alert" > × </button>
- <strong> Ceeb toom! </strong> Zoo tshaj koj tus kheej, koj tsis saib zoo heev.
- </div>
Mobile Safari thiab Mobile Opera browsers, ntxiv rau tus data-dismiss="alert"
cwj pwm, yuav tsum muaj href="#"
rau kev tshem tawm ntawm kev ceeb toom thaum siv ib qho <a>
.
- <a href="#" class = "kaw" data-dismiss = "alert"> & times ; _ </a>
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.
- <button type = "button" class = "kaw" data-dismiss = "alert" > × </button>
Siv cov lus ceeb toom jQuery plugin kom tshem tawm cov lus ceeb toom sai thiab yooj yim.
Rau cov lus ntev dua, ua kom cov padding nyob rau sab saum toj thiab hauv qab ntawm daim ntawv ceeb toom wrapper los ntawm kev ntxiv .alert-block
.
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" >
- <button type = "button" class = "kaw" data-dismiss = "alert" > × </button>
- <h4> Ceeb toom! </h4>
- Best check koj tus kheej, koj tsis yog ...
- </div>
Ntxiv cov chav kawm xaiv tau los hloov qhov kev ceeb toom lub ntsiab lus.
- <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 nyob hauv IE7-8.
- <div class = "progress-striped" >
- <div class = "bar" style = " width : 20 %; " ></div>
- </div>
Ntxiv .active
rau .progress-striped
animate cov kab txaij sab xis mus rau sab laug. Tsis muaj nyob rau hauv tag nrho cov versions ntawm IE.
- > _ _ _ _
- <div class = "bar" style = " width : 40 %; " ></div>
- </div>
Muab ntau qhov bar rau hauv ib yam .progress
los muab lawv tso.
- <div class = "progress" >
- <div class = "bar bar-success" style = " width : 35 %; " ></div>
- <div class = "bar bar-warning" style = " width : 20 %; " ></div>
- <div class = "bar bar-danger" style = " width : 10 %; " ></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.
- <div class = "progress-info" >
- <div class = "bar" style = " width : 20 % " ></div>
- </div>
- <div class = "progress-success" >
- <div class = "bar" style = " width : 40 % " ></div>
- </div>
- <div class = "progress-warning" >
- <div class = "bar" style = " width : 60 % " ></div>
- </div>
- <div class = "progress-danger" >
- <div class = "bar" style = " width : 80 % " ></div>
- </div>
Zoo ib yam li cov xim xim, peb muaj cov kab txaij sib txawv.
- <div class = "progress-info progress-striped" >
- <div class = "bar" style = " width : 20 % " ></div>
- </div>
- > _ _ _ _
- <div class = "bar" style = " width : 40 % " ></div>
- </div>
- <div class = "progress-warning progress-striped" >
- <div class = "bar" style = " width : 60 % " ></div>
- </div>
- <div class = "progress-danger progress-striped" >
- <div class = "bar" style = " width : 80 % " ></div>
- </div>
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.
Versions ua ntej Internet Explorer 10 thiab Opera 12 tsis txhawb cov animations.
Abstract object styles rau tsim ntau hom ntawm cov khoom (xws li blog lus, Tweets, thiab lwm yam) uas feature ib sab laug-los yog txoj cai-tsim duab nrog rau cov ntawv nyeem.
Lub neej ntawd xov xwm tso cai rau ntab ib yam khoom tawm (duab, yees duab, suab) mus rau sab laug lossis sab xis ntawm cov ntsiab lus thaiv.
- <div class = "media" >
- <a class = "rub-left" href = "#" >
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "media-heading" > Media heading </h4>
- ...
- <!-- Nested media object -->
- <div class = "media" >
- ...
- </div>
- </div>
- </div>
Nrog me ntsis ntawm cov cim ntxiv, koj tuaj yeem siv xov xwm hauv daim ntawv teev npe (tseem ceeb rau cov lus tawm tswv yim lossis cov npe kab lus).
Cras zaum amet nibh libero, hauv gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum hauv vulputate ntawm, tempus viverra turpis.
- <ul class = "media-list" >
- <li class = "media" >
- <a class = "rub-left" href = "#" >
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "media-heading" > Media heading </h4>
- ...
- <!-- Nested media object -->
- <div class = "media" >
- ...
- </div>
- </div>
- </li>
- </ul>
Siv lub qhov dej zoo li cov nyhuv yooj yim ntawm ib lub caij los muab nws cov nyhuv inset.
- <div class = "zoo" >
- ...
- </div>
Tswj padding thiab rounded ces kaum nrog ob qho kev xaiv hloov cov chav kawm.
- <div class = "zoo-loj" >
- ...
- </div>
- <div class = "zoo-me" >
- ...
- </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="#"
nias txheej xwm yog tias koj xav siv lub thauj tog rau nkoj.
- <a class = "kaw" href = "#" > × </a>
Cov chav kawm yooj yim, tsom rau cov khoom me me lossis kev coj cwj pwm tweaks.
ntab ib yam sab laug
- class = "rub-left"
- . rub - laug {
- ntab : sab laug ;
- }
Float ib lub ntsiab cai
- class = "rub-right"
- . rub - txoj cai {
- float : yog ;
- }
Hloov cov xim xim rau#999
- class = "muted"
- . muted {
- xim : #999;
- }
Tshem tawm float
ntawm tej yam
- class = "clearfix"
- . clearfix {
- * zoom : 1 ;
- &: ua ntej ,
- &: tom qab {
- zaub : rooj ;
- cov ntsiab lus : "" ;
- }
- &: tom qab {
- meej : ob leeg ;
- }
- }