Zida zambiri zomwe zitha kugwiritsidwanso ntchito zomwe zimapangidwira kuti zipereke kuyenda, zidziwitso, popovers, ndi zina zambiri.
Zosintha, menyu wanthawi zonse kuti muwonetse mndandanda wamaulalo. Zapangidwa kuti zizitha kulumikizana ndi pulogalamu yowonjezera ya JavaScript .
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#"> Zochita </a></li >
- <li><a tabindex = "-1" href = "#"> Zochita zina </a></li>
- <li><a tabindex = "-1" href = "#" > Chinanso apa </a></li>
- <li class = "divider" > </li>
- <li><a tabindex = "-1" href = "#"> Ulalo wolekanitsidwa </a> </li>
- </ul>
Kuyang'ana pa menyu otsika, nayi HTML yofunikira. Muyenera kukulunga choyambitsa chotsitsa ndi menyu yotsitsa mkati .dropdown
, kapena chinthu china chomwe chimalengeza position: relative;
. Ndiye ingopangani menyu.
- <div class = "dropdown" >
- <!-- Lumikizani kapena batani kuti musinthe kutsitsa -->
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dLabel" >
- <li><a tabindex = "-1" href = "#"> Zochita </a></li >
- <li><a tabindex = "-1" href = "#"> Zochita zina </a></li>
- <li><a tabindex = "-1" href = "#" > Chinanso apa </a></li>
- <li class = "divider" > </li>
- <li><a tabindex = "-1" href = "#"> Ulalo wolekanitsidwa </a> </li>
- </ul>
- </div>
Gwirizanitsani mindandanda kumanja ndikuwonjezeranso milingo yowonjezera yotsitsa.
Onjezani .pull-right
ku a .dropdown-menu
kulumikiza kumanja menyu yotsitsa.
- <ul class = "dropdown-menu pull-right" role = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
Onjezani .disabled
ku <li>
a potsitsa kuti mulepheretse ulalo.
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#"> Ulalo wokhazikika </a> </li>
- <li class = "disabled" ><a tabindex = "-1" href = "#"> Ulalo wolemala </a></li >
- <li><a tabindex = "-1" href = "#"> Ulalo wina </a></li>
- </ul>
Onjezani mulingo wowonjezera wamamenyu otsitsa, omwe akuwoneka pa hover ngati a OS X, ndi zowonjezera zina zosavuta. Onjezani pazosankha .dropdown-submenu
zilizonse li
zomwe zilipo kuti mukongolere zokha.
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dLabel" >
- ...
- <li class = "dropdown-submenu" >
- <a tabindex = "-1" href = "#"> Zosankha zina </a>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
Kusindikiza kosavuta kouziridwa ndi Rdio, koyenera kwa mapulogalamu ndi zotsatira zosaka. Chotchinga chachikulu ndi chovuta kuphonya, chiwonjezeke mosavuta, ndipo chimapereka malo akulu odina.
- <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 = "#"> Kenako </a> </li>
- </ul>
- </div>
Maulalo ndi makonda pamikhalidwe yosiyanasiyana. Gwiritsani .disabled
ntchito maulalo osadina .active
ndikuwonetsa tsamba lomwe lilipo.
- <div class = "pagination" >
- <ul>
- <li class = "disabled" ><a href = "#" > « </a></li>
- <li class = "active" > <a href = "#"> 1 </a></li>
- ...
- </ul>
- </div>
Mutha kusinthanitsa ma nangula omwe akugwira ntchito kapena olemala kuti muchotse magwiridwe antchito ndikusunga masitayelo omwe mukufuna.
- <div class = "pagination" >
- <ul>
- <li kalasi = "olumala" ><span> « </span></li>
- <li class = "active" ><span> 1 </span></li>
- ...
- </ul>
- </div>
Mukufuna zokhala zazikulu kapena zazing'ono? Onjezani .pagination-large
, .pagination-small
, kapena .pagination-mini
ma size owonjezera.
- <div class = "pagination pagination-large" >
- <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>
Onjezani limodzi mwamakalasi awiri osankha kuti musinthe masinthidwe amitundu: .pagination-centered
ndi .pagination-right
.
- <div class = "pagination-centered" >
- ...
- </div>
- <div class = "pagination pagination-right" >
- ...
- </div>
Maulalo am'mbuyomu komanso otsatirawa kuti mukhazikitse zosavuta zamitundu yokhala ndi zowunikira komanso masitayelo. Ndi yabwino kwa masamba osavuta monga mabulogu kapena magazini.
Mwachikhazikitso, pager centers maulalo.
- <ul class = "pager" >
- <li><a href = "#"> Yam'mbuyo </a> </li>
- <li><a href = "#"> Kenako </a> </li>
- </ul>
Kapenanso, mutha kugwirizanitsa ulalo uliwonse kumbali:
- <ul class = "pager" >
- <li class = "previous" >
- <a href = "#" > ← Zakale </a>
- </li>
- <li class = "next" >
- <a href = "#"> Zatsopano &rarr ; </a>
- </li>
- </ul>
Maulalo a Pager amagwiritsanso .disabled
ntchito gulu lazambiri lazachikunja.
- <ul class = "pager" >
- <li class = "olemala kale" >
- <a href = "#" > ← Zakale </a>
- </li>
- ...
- </ul>
Zolemba | Markup |
---|---|
Zosasintha | <span class="label">Default</span> |
Kupambana | <span class="label label-success">Success</span> |
Chenjezo | <span class="label label-warning">Warning</span> |
Zofunika | <span class="label label-important">Important</span> |
Zambiri | <span class="label label-info">Info</span> |
Zosiyana | <span class="label label-inverse">Inverse</span> |
Dzina | Chitsanzo | Markup |
---|---|---|
Zosasintha | 1 | <span class="badge">1</span> |
Kupambana | 2 | <span class="badge badge-success">2</span> |
Chenjezo | 4 | <span class="badge badge-warning">4</span> |
Zofunika | 6 | <span class="badge badge-important">6</span> |
Zambiri | 8 | <span class="badge badge-info">8</span> |
Zosiyana | 10 | <span class="badge badge-inverse">10</span> |
Kuti mugwiritse ntchito mosavuta, zilembo ndi mabaji azingogwa (kudzera pa :empty
chosankha cha CSS) ngati mulibe chilichonse mkati mwake.
Chigawo chopepuka, chosinthika kuti chiwonetse zomwe zili patsamba lanu. Zimagwira ntchito bwino pazamalonda komanso masamba olemera.
Ichi ndi gawo losavuta la ngwazi, gawo losavuta la jumbotron poyitanitsa chidwi chowonjezereka pazomwe zili kapena zambiri.
- <div class = "hero-unit" >
- <h1> Mutu </h1>
- <p> Tagline </p>
- <p>
- <a class = "btn btn-primary btn-large">
- Dziwani zambiri
- </a>
- </p>
- </div>
Chipolopolo chosavuta kuti h1
muthe kuyika moyenerera ndikugawa magawo omwe ali patsamba. Itha kugwiritsa ntchito h1
's default small
, element komanso zigawo zina zambiri (ndi masitaelo owonjezera).
- <div class = "tsamba-mutu" >
- <h1> Chitsanzo cha mutu watsamba <small> Mutu wapamutu </small></h1>
- </div>
Mwachikhazikitso, zikwangwani za Bootstrap zidapangidwa kuti ziziwonetsa zithunzi zolumikizidwa zomwe zili ndi zolembera zochepa.
Powonjezera pang'ono, ndizotheka kuwonjezera zamtundu uliwonse wa HTML monga mitu, ndime, kapena mabatani pazithunzi.
Tizithunzi (kale .media-grid
mpaka v1.4) ndi zabwino kwa ma gridi a zithunzi kapena makanema, zotsatira zosaka zithunzi, malonda ogulitsa, ma portfolio, ndi zina zambiri. Zitha kukhala maulalo kapena zokhazikika.
Zolemba pazithunzi ndizosavuta - ul
zokhala ndi chiwerengero li
chilichonse ndizomwe zimafunikira. Ndiwosinthika kwambiri, kulola mtundu uliwonse wazinthu zokhala ndi zolembera zochulukirapo kuti zimakutira zomwe muli nazo.
Pomaliza, chigawo chazithunzi chimagwiritsa ntchito magulu omwe alipo kale - monga .span2
kapena .span3
-kuwongolera kukula kwazithunzi.
Monga tanena kale, chizindikiro chofunikira pazithunzi ndizopepuka komanso zowongoka. Nayi mawonekedwe okhazikika azithunzi zolumikizidwa :
- <ul class = "thumbnails" >
- <li class = "span4" >
- <a href = "#" class = "thumbnail"> _
- <img data-src = "holder.js/300x200" alt = "" >
- </a>
- </li>
- ...
- </ul>
Pazokonda za HTML pazithunzithunzi, zolembera zimasintha pang'ono. <a>
Kuti tilole zomwe zili mu block level kulikonse, timasinthana <div>
motere:
- <ul class = "thumbnails" >
- <li class = "span4" >
- <div class = "thumbnail" >
- <img data-src = "holder.js/300x200" alt = "" >
- <h3> Chizindikiro chazithunzi </h3>
- <p> Mawu azithunzi... </p>
- </div>
- </li>
- ...
- </ul>
Onani zosankha zanu zonse ndi magulu osiyanasiyana a gridi omwe mungapeze. Mukhozanso kusakaniza ndi ma size osiyana.
Manga mawu aliwonse ndi batani lochotsapo .alert
kuti mumve chenjezo lofunikira.
- <div class = "chenjezo" >
- <button type = "button" class = "close" data-dismiss = "alert" > × </ batani>
- <strong> Chenjezo! </strong> Chabwino fufuzani inu nokha, simukuwoneka bwino kwambiri.
- </div>
Asakatuli a Mobile Safari ndi Mobile Opera, kuphatikiza data-dismiss="alert"
pamalingaliro, amafunikira href="#"
kuchotsedwa kwa zidziwitso mukamagwiritsa ntchito <a>
tag.
- <a href = "#" class = "close" data-dismiss = "chenjezo" > × </a>
Kapenanso, mutha kugwiritsa ntchito <button>
chinthu chomwe chili ndi mawonekedwe a data, chomwe tasankha kuchita pa ma docs athu. Mukamagwiritsa ntchito <button>
, muyenera kuphatikiza type="button"
kapena mafomu anu sangatumize.
- <button type = "button" class = "close" data-dismiss = "alert" > × </ batani>
Gwiritsani ntchito zochenjeza za jQuery kuti muchotse zidziwitso mwachangu komanso mosavuta.
Kwa mauthenga ataliatali, onjezani zotchingira pamwamba ndi pansi pa chokulunga chochenjeza powonjezera .alert-block
.
Chabwino, fufuzani nokha, simukuwoneka bwino kwambiri. Nulla vitae elit libero, pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
- <div class = "alert alert-block" >
- <button type = "button" class = "close" data-dismiss = "alert" > × </ batani>
- <h4> Chenjezo! </ h4>
- Chabwino dziyeseni nokha, simuli ...
- </div>
Onjezani makalasi osankha kuti musinthe tanthauzo la zidziwitso.
- <div class = "cholakwika chochenjeza" >
- ...
- </div>
- <div class = "alert alert-kupambana" >
- ...
- </div>
- <div class = "chidziwitso chochenjeza" >
- ...
- </div>
Njira yofikira yomwe ili ndi gradient yoyima.
- <div class = "progress" >
- <div class = "bar" style = " wide : 60 %; " ></div>
- </div>
Amagwiritsa ntchito gradient kuti apange mizeremizere. Palibe mu IE7-8.
- <div class = "progress progress-striped" >
- <div class = "bar" style = " wide : 20 %; " ></div>
- </div>
Onjezani .active
kuti .progress-striped
mupangitse mikwingwirima kumanja kupita kumanzere. Palibe m'mitundu yonse ya IE.
- <div class = "kupita patsogolo kogwira ntchito" >
- <div class = "bar" style = " wide : 40 %; " ></div>
- </div>
Ikani mipiringidzo yambiri mofanana .progress
kuti muyike.
- <div class = "progress" >
- <div class = "bar-success" style = " wide : 35 %; " ></div>
- <div class = "bar-warning" style = " wide : 20 %; " ></div>
- <div class = "bar-danger" style = " wide : 10 %; " ></div>
- </div>
Mipiringidzo yopita patsogolo imagwiritsa ntchito mabatani omwewo ndi makalasi ochenjeza a masitayelo ofanana.
- <div class = "progress progress-info" >
- <div class = "bar" style = " wide : 20 % > </div>
- </div>
- <div class = "kupita patsogolo-kupambana" >
- <div class = "bar" style = " wide : 40 % > </div>
- </div>
- <div class = "chenjezo lakupita patsogolo" >
- <div class = "bar" style = " wide : 60 % " ></div>
- </div>
- <div class = "kupita patsogolo-ngozi" >
- <div class = "bar" style = " width : 80 % " ></div>
- </div>
Mofanana ndi mitundu yolimba, tili ndi mipiringidzo yamitundu yosiyanasiyana.
- <div class = "kupita patsogolo-chidziwitso chakupita patsogolo" >
- <div class = "bar" style = " wide : 20 % > </div>
- </div>
- <div class = "kupita patsogolo-kupambana-kupambana-kupambana" >
- <div class = "bar" style = " wide : 40 % > </div>
- </div>
- <div class = "kupita patsogolo-chenjezo lakupita patsogolo-kukhazikika" >
- <div class = "bar" style = " wide : 60 % " ></div>
- </div>
- <div class = "kupita patsogolo-kutsogolo kwa ngozi" >
- <div class = "bar" style = " width : 80 % " ></div>
- </div>
Mipiringidzo yopita patsogolo imagwiritsa ntchito ma gradients a CSS3, masinthidwe, ndi makanema ojambula kuti akwaniritse zotsatira zake zonse. Izi sizimathandizidwa mu IE7-9 kapena mitundu yakale ya Firefox.
Zomasulira zakale kuposa Internet Explorer 10 ndi Opera 12 sizigwirizana ndi 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.
Makanema osasinthika amalola kuyandama chinthu chapa media (zithunzi, makanema, zomvera) kumanzere kapena kumanja kwa block block.
- <div class = "media" >
- <a class = "pull-left" href = "#"> _
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "media-heading" > Mutu wankhani </h4>
- ...
- <!-- Nested media object -->
- <div class = "media" >
- ...
- </div>
- </div>
- </div>
Ndizowonjezera pang'ono, mutha kugwiritsa ntchito media mkati mwa mndandanda (zothandiza pamindandanda yankhani kapena mindandanda).
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.
- <ul class = "media-list" >
- <li class = "media" >
- <a class = "pull-left" href = "#"> _
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "media-heading" > Mutu wankhani </h4>
- ...
- <!-- Nested media object -->
- <div class = "media" >
- ...
- </div>
- </div>
- </li>
- </ul>
Gwiritsani ntchito chitsime ngati chosavuta pa chinthu kuti chiwonekere.
- <div class = "chabwino" >
- ...
- </div>
Control padding ndi ngodya zozungulira ndi makalasi awiri osankha osintha.
- <div class = "chabwino-chabwino" >
- ...
- </div>
- <div class = "chabwino pang'ono" >
- ...
- </div>
Gwiritsani ntchito chizindikiro chapafupi chotseka pochotsa zinthu monga ma modals ndi zidziwitso.
- <button class = "close" > × </ batani>
Zida za iOS zimafunikira href="#"
kudina zochitika ngati mungafune kugwiritsa ntchito nangula.
- <a class = "close" href = "#" > × </a>
Makalasi osavuta, olunjika akuwonetsa pang'ono kapena zosintha zamakhalidwe.
Sungani chinthu kumanzere
- class = "kukoka kumanzere"
- . kukoka - kumanzere {
- kuyandama : kumanzere ;
- }
Nyamulirani chinthu kumanja
- class = "kukokera kumanja"
- . kukoka - kumanja {
- kuyandama : kumanja ;
- }
Sinthani mtundu wa chinthu kukhala#999
- class = "muted"
- . osalankhula {
- mtundu : #999;
- }
Chotsani float
pa chinthu chilichonse
- class = "clearfix"
- . clearfix {
- * kukula : 1 ;
- &: kale ,
- &: pambuyo {
- chiwonetsero : tebulo ;
- zomwe : "" ;
- }
- &: pambuyo {
- zomveka : zonse ;
- }
- }