ʻO ka nui o nā mea hoʻohana hou i kūkulu ʻia e hāʻawi i ka hoʻokele, nā mākaʻikaʻi, nā popovers, a me nā mea hou aku.
Hiki ke hoʻololi i ka papa kuhikuhi no ka hōʻike ʻana i nā papa inoa o nā loulou. Hana ʻia me ka plugin JavaScript dropdown .
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Hana </a></li>
- <li><a tabindex = "-1" href = "#" > Hana hou </a></li>
- <li><a tabindex = "-1" href = "#" > He mea ʻē aʻe ma aneʻi </a></li>
- <li class = "divider" ></li>
- <li><a tabindex = "-1" href = "#" > loulou kaʻawale </a></li>
- </ul>
Ke nānā wale nei i ka papa kuhikuhi iho, eia ka HTML pono. Pono ʻoe e kāʻei i ke kumu o ka hāʻule iho a me ka papa kuhikuhi i lalo i loko o .dropdown
, a i ʻole kekahi mea e haʻi aku ai position: relative;
. A laila hana wale i ka papa kuhikuhi.
- <div class = "dropdown" >
- <!-- Link a i ʻole pihi e hoʻohuli i ka hāʻule iho -->
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dLabel" >
- <li><a tabindex = "-1" href = "#" > Hana </a></li>
- <li><a tabindex = "-1" href = "#" > Hana hou </a></li>
- <li><a tabindex = "-1" href = "#" > He mea ʻē aʻe ma aneʻi </a></li>
- <li class = "divider" ></li>
- <li><a tabindex = "-1" href = "#" > loulou kaʻawale </a></li>
- </ul>
- </div>
Hoʻopili i nā menus i ka ʻākau a hoʻohui i nā pae hoʻokuʻu iho.
Hoʻohui .pull-right
i kahi .dropdown-menu
e hoʻolike ʻākau i ka papa kuhikuhi hāʻule iho.
- <ul class = "dropdown-menu pull-right" role = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
E hoʻohui .disabled
i kahi <li>
ma ka hāʻule iho e hoʻopau i ka loulou.
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Loulou mau </a></li>
- <li class = "disabled" ><a tabindex = "-1" href = "#" > Ua pio ka loulou </a></li>
- <li><a tabindex = "-1" href = "#" > ʻO kekahi loulou </a></li>
- </ul>
Hoʻohui i kahi pae kiʻekiʻe o nā menus dropdown, e ʻike ʻia ma ka hover e like me ka OS X, me kekahi mau hoʻohui markup maʻalahi. E hoʻohui .dropdown-submenu
i kekahi li
i loko o kahi papa kuhikuhi hoʻokuʻu iho no ka hoʻolālā ʻakomi.
- <ul class = "dropdown-menu" role = "menu" aria-labelledby = "dLabel" >
- ...
- <li class = "dropdown-submenu" >
- <a tabindex = "-1" href = "#" > Nā koho hou aku </a>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
ʻO ka pagination maʻalahi i hoʻoulu ʻia e Rdio, maikaʻi no nā noi a me nā hopena ʻimi. ʻO ka poloka nui he paʻakikī ke hala, hiki ke hoʻonui ʻia, a hāʻawi i nā wahi kaomi nui.
- <div class = "ka helu helu" >
- <ul>
- <li><a href = "#" > Mamua </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 = "#" > Aʻe </a></li>
- </ul>
- </div>
Hoʻopilikino ʻia nā loulou no nā kūlana like ʻole. E hoʻohana .disabled
no nā loulou unclickable a .active
e kuhikuhi i ka ʻaoʻao o kēia manawa.
- <div class = "ka helu helu" >
- <ul>
- <li class = "disabled" ><a href = "#" > « </a></li>
- <li class = "active" ><a href = "#" > 1 </a></li>
- ...
- </ul>
- </div>
Hiki iā ʻoe ke hoʻololi i nā heleuma ikaika a paʻa ʻole paha no nā spans e wehe i ka hana kaomi ʻoiai e mālama ana i nā ʻano i manaʻo ʻia.
- <div class = "ka helu helu" >
- <ul>
- <li class = "disabled" ><span> « </span></li>
- <li class = "active" ><span> 1 </span></li>
- ...
- </ul>
- </div>
Makemake ʻoe i ka pagination nui a liʻiliʻi paha? Hoʻohui .pagination-large
, .pagination-small
, a i ʻole .pagination-mini
no nā nui ʻē aʻe.
- <div class = "pagination pagination-nui" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "ka helu helu" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-liʻiliʻi" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-mini" >
- <ul>
- ...
- </ul>
- </div>
Hoʻohui i hoʻokahi o nā papa koho ʻelua e hoʻololi i ka alignment o nā loulou pagination: .pagination-centered
a .pagination-right
.
- <div class = "ka helu helu helu helu helu" >
- ...
- </div>
- <div class = "pagination pagination-akau" >
- ...
- </div>
Nā loulou wikiwiki mua a me hope no ka hoʻokō ʻana i ka pagination maʻalahi me ka māka māmā a me nā ʻano. He mea maikaʻi ia no nā pūnaewele maʻalahi e like me nā blog a i ʻole nā makasina.
Ma ka maʻamau, hoʻonohonoho ka pager i nā loulou.
- <ul class = "pager" >
- <li><a href = "#" > Mua </a> </li>
- <li><a href = "#" > Aʻe </a></li>
- </ul>
ʻO kahi ʻē aʻe, hiki iā ʻoe ke hoʻohālikelike i kēlā me kēia loulou i nā ʻaoʻao:
- <ul class = "pager" >
- <li class = "mua" >
- <a href = "#" > ← Kahiko </a>
- </li>
- <li class = "next" >
- <a href = "#" > Mea hou → </a>
- </li>
- </ul>
Hoʻohana pū nā loulou Pager i ka .disabled
papa hana maʻamau mai ka pagination.
- <ul class = "pager" >
- <li class = "kūʻokoʻa mua" >
- <a href = "#" > ← Kahiko </a>
- </li>
- ...
- </ul>
Lepili | Markup |
---|---|
Default | <span class="label">Default</span> |
Pōmaikaʻi | <span class="label label-success">Success</span> |
ʻŌlelo aʻo | <span class="label label-warning">Warning</span> |
Mea nui | <span class="label label-important">Important</span> |
ʻIke | <span class="label label-info">Info</span> |
Hoʻololi | <span class="label label-inverse">Inverse</span> |
inoa | Laʻana | Markup |
---|---|---|
Default | 1 | <span class="badge">1</span> |
Pōmaikaʻi | 2 | <span class="badge badge-success">2</span> |
ʻŌlelo aʻo | 4 | <span class="badge badge-warning">4</span> |
Mea nui | 6 | <span class="badge badge-important">6</span> |
ʻIke | 8 | <span class="badge badge-info">8</span> |
Hoʻololi | 10 | <span class="badge badge-inverse">10</span> |
No ka hoʻokō maʻalahi, e hāʻule wale nā lepili a me nā hōʻailona (ma o ka :empty
mea koho CSS) inā ʻaʻohe ʻike i loko.
ʻO kahi ʻāpana māmā a maʻalahi e hōʻike i nā ʻike koʻikoʻi ma kāu pūnaewele. He hana maikaʻi ia ma nā kahua kūʻai a me nā ʻike-kaumaha.
He pūʻali koa maʻalahi kēia, he ʻano ʻano jumbotron maʻalahi no ke kāhea ʻana i ka nānā hou aku i nā ʻike i hōʻike ʻia.
- <div class = "hui meʻe" >
- <h1> Poʻomanaʻo </h1>
- <p> Lepe inoa </p>
- <p>
- <a papa = "btn btn-kumu btn-nui" >
- Aʻo hou mai
- </a>
- </p>
- </div>
He pūpū maʻalahi no ka h1
hoʻokaʻawale ʻana i nā ʻāpana o ka ʻikepili ma kahi ʻaoʻao. Hiki iā ia ke hoʻohana i ka h1
' default small
, element a me ka hapa nui o nā mea ʻē aʻe (me nā ʻano ʻē aʻe).
- <div class = "page-header" >
- <h1> Ke poʻo ʻaoʻao laʻana <small> Subtext no ke poʻo </small></h1>
- </div>
Ma ka paʻamau, ua hoʻolālā ʻia nā kiʻi liʻiliʻi o Bootstrap e hōʻike i nā kiʻi i hoʻopili ʻia me ka hōʻailona liʻiliʻi.
Me kahi hōʻailona ʻokoʻa, hiki ke hoʻohui i nā ʻano HTML like ʻole e like me nā poʻo, nā paukū, a i ʻole nā pihi i loko o nā kiʻi liʻiliʻi.
He mea maikaʻi nā kiʻi liʻiliʻi (ma mua .media-grid
a hiki i ka v1.4) no nā pahu kiʻi a i ʻole wikiō, nā hopena huli kiʻi, nā huahana kūʻai aku, nā portfolios, a me nā mea hou aku. Hiki iā lākou ke loulou a i ʻole maʻiʻo static.
He mea maʻalahi ka hōʻailona kiʻi liʻiliʻi—ʻo ul
ia li
wale nō ka mea e pono ai. He mea maʻalahi hoʻi ia, e ʻae ana i kēlā me kēia ʻano maʻiʻo me kahi markup hou aʻe e kāʻei i kāu ʻike.
ʻO ka mea hope, hoʻohana ka ʻāpana kiʻi liʻiliʻi i nā papa ʻōnaehana grid i loaʻa-like .span2
a i ʻole .span3
-no ka hoʻomalu ʻana i nā ana liʻiliʻi liʻiliʻi.
E like me ka mea i ʻōlelo ʻia ma mua, ʻo ka markup i koi ʻia no nā thumbnails he māmā a pololei. Eia ka nānā ʻana i ka hoʻonohonoho paʻamau no nā kiʻi i hoʻopili ʻia :
- <ul class = "thumbnails" >
- <li class = "span4" >
- <a href = "#" class = "thumbnail" >
- <img data-src = "holder.js/300x200" alt = "" >
- </a>
- </li>
- ...
- </ul>
No ka maʻiʻo HTML maʻamau i nā kiʻi liʻiliʻi, hoʻololi iki ka markup. No ka ʻae ʻana i ka maʻiʻo pae poloka ma nā wahi āpau, hoʻololi mākou i ka <a>
mea <div>
like me:
- <ul class = "thumbnails" >
- <li class = "span4" >
- <div class = "thumbnail" >
- <img data-src = "holder.js/300x200" alt = "" >
- <h3> Lepili liʻiliʻi < /h3>
- <p> Kākau kiʻi liʻiliʻi... </p>
- </div>
- </li>
- ...
- </ul>
E ʻimi i kāu mau koho a pau me nā papa mākia like ʻole i loaʻa iā ʻoe. Hiki iā ʻoe ke hoʻohui a hoʻohālikelike i nā nui like ʻole.
E kāʻei i kekahi kikokikona a me kahi pihi hoʻokuʻu koho .alert
no ka memo makaʻala kumu.
- <div class = "makaʻala" >
- < ʻano kī = "pāpā" papa = "kokoke" data-dismiss = "makaʻala" > &manawa; </ pihi>
- <strong> 'Ōlelo Aʻo! </strong> ʻO ka nānā maikaʻi loa iā ʻoe iho, ʻaʻole ʻoe maikaʻi loa.
- </div>
Pono nā polokalamu kele pūnaewele Mobile Safari a me Mobile Opera, i ka hoʻohui ʻana i ke data-dismiss="alert"
ʻano, href="#"
no ka hoʻopau ʻana i nā mākaʻikaʻi i ka wā e hoʻohana ai i kahi <a>
hōʻailona.
- <a href = "#" class = "close" data-dismiss = "alert" > × </a>
ʻO kahi ʻē aʻe, hiki iā ʻoe ke hoʻohana i kahi <button>
mea me ka ʻikepili ʻikepili, a mākou i koho ai e hana no kā mākou mau palapala. I ka hoʻohana ʻana iā <button>
, pono ʻoe e hoʻokomo type="button"
a i ʻole e waiho ʻia kāu mau palapala.
- < ʻano kī = "pāpā" papa = "kokoke" data-dismiss = "makaʻala" > &manawa; </ pihi>
E hoʻohana i ka plugin jQuery alerts no ka hoʻopau wikiwiki a me ka maʻalahi o nā makaʻala.
No nā memo lōʻihi, e hoʻonui i ka padding ma luna a ma lalo o ka ʻōwili makaʻala ma ka hoʻohui ʻana i .alert-block
.
ʻO ka nānā maikaʻi iā ʻoe iho, ʻaʻole maikaʻi ʻoe. Nulla vitae elit libero, a pharetra augue. ʻO ka hoʻomaka ʻana o ka cursus magna, vel scelerisque nisl consectetur et.
- <div class = "pākaʻi makaʻala" >
- < ʻano kī = "pāpā" papa = "kokoke" data-dismiss = "makaʻala" > &manawa; </ pihi>
- <h4> 'Ōlelo Aʻo! </h4>
- ʻO ka nānā maikaʻi loa iā ʻoe iho, ʻaʻole ʻoe ...
- </div>
Hoʻohui i nā papa koho e hoʻololi i ka manaʻo o ka makaʻala.
- <div class = "alaala-hewa" >
- ...
- </div>
- <div class = "alaala-kūpono" >
- ...
- </div>
- <div class = "ʻike makaʻala makaʻala" >
- ...
- </div>
Paʻamau pae holomua me ka gradient kū pololei.
- <div class = "holomua" >
- <div class = "bar" style = " laula : 60 %; " ></div>
- </div>
Hoʻohana i ka gradient e hana i kahi hopena kaha. ʻAʻole i loaʻa ma IE7-8.
- <div class = "holoi holomua holomua" >
- <div class = "bar" style = " laula : 20 %; " ></div>
- </div>
Hoʻohui .active
i .progress-striped
e hoʻolalelale i nā kaha ʻākau a hema. ʻAʻole loaʻa i nā mana āpau o IE.
- <div class = "progress progress-striped active" >
- <div class = "bar" style = " laula : 40 %; " ></div>
- </div>
E kau i nā pahu he nui i loko o ka mea like .progress
e hoʻopaʻa iā lākou.
- <div class = "holomua" >
- <div class = "bar bar-success" style = " laula : 35 %; " ></div>
- <div class = "bar bar-warning" style = " laula : 20 %; " ></div>
- <div class = "bar bar-danger" style = " laula : 10 %; " ></div>
- </div>
Hoʻohana nā pahu holomua i kekahi o nā pihi like a me nā papa makaʻala no nā ʻano like.
- <div class = "ʻike holomua holomua" >
- <div class = "bar" style = " laula : 20 % " ></div>
- </div>
- <div class = "holomua-holomua" >
- <div class = "bar" style = " laula : 40 % " ></div>
- </div>
- <div class = "palapala holomua holomua" >
- <div class = "bar" style = " laula : 60 % " ></div>
- </div>
- <div class = "holomua holomua-pilikia" >
- <div class = "bar" style = " laula : 80 % " ></div>
- </div>
E like me nā waihoʻoluʻu paʻa, loaʻa iā mākou nā ʻāpana holomua ʻokoʻa.
- <div class = "progress progress-info progress-striped" >
- <div class = "bar" style = " laula : 20 % " ></div>
- </div>
- <div class = "holomua holomua-holomua holomua-striped" >
- <div class = "bar" style = " laula : 40 % " ></div>
- </div>
- <div class = "progress progress-warning progress-striped" >
- <div class = "bar" style = " laula : 60 % " ></div>
- </div>
- <div class = "holomua holomua-pilikia-pilikia" >
- <div class = "bar" style = " laula : 80 % " ></div>
- </div>
Hoʻohana nā pā holomua i nā gradient CSS3, nā hoʻololi, a me nā animation e hoʻokō i kā lākou hopena āpau. ʻAʻole kākoʻo ʻia kēia mau hiʻohiʻona ma IE7-9 a i ʻole nā mana kahiko o Firefox.
ʻAʻole kākoʻo nā mana ma mua o Internet Explorer 10 a me Opera 12 i nā animation.
Nā ʻano mea ʻokoʻa no ke kūkulu ʻana i nā ʻano ʻāpana like ʻole (e like me nā manaʻo blog, Tweets, etc.) e hōʻike ana i kahi kiʻi hema a i ʻole ʻākau paha me ka ʻike kikokikona.
ʻAe ka media paʻamau e lana i kahi mea media (kiʻi, wikiō, leo) ma ka hema a ʻākau paha o kahi poloka maʻiʻo.
- <div class = "media" >
- <a papa = "huki-hema" href = "#" >
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "media-heading" > Media heading </h4>
- ...
- <!-- Mea hoʻopaʻa ʻia -->
- <div class = "media" >
- ...
- </div>
- </div>
- </div>
Me kahi hōʻailona ʻokoʻa, hiki iā ʻoe ke hoʻohana i ka media i loko o ka papa inoa (pono no nā pae manaʻo a i ʻole nā papa inoa ʻatikala).
Cras noho amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
- <ul class = "media-list" >
- <li class = "media" >
- <a papa = "huki-hema" href = "#" >
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "media-heading" > Media heading </h4>
- ...
- <!-- Mea hoʻopaʻa ʻia -->
- <div class = "media" >
- ...
- </div>
- </div>
- </li>
- </ul>
E hoʻohana i ka pūnāwai ma ke ʻano he hopena maʻalahi i kahi mea e hāʻawi ai i kahi hopena inset.
- <div class = "maikaʻi" >
- ...
- </div>
E hoʻomalu i ka padding a me nā kihi pōʻai me ʻelua papa hoʻololi koho.
- <div class = "well well-nui" >
- ...
- </div>
- <div class = "well well-liʻiliʻi" >
- ...
- </div>
E hoʻohana i ka hōʻailona kokoke maʻamau no ka hoʻokuʻu ʻana i nā ʻike e like me nā modals a me nā makaʻala.
- <pāpā pihi = " kokoke" > &manawa; </ pihi>
Pono nā polokalamu iOS i nā href="#"
hanana kaomi inā makemake ʻoe e hoʻohana i kahi heleuma.
- <a papa = "kokoke" href = "#" > &manawa; </a>
ʻO nā papa maʻalahi no ka hōʻike liʻiliʻi a i ʻole nā ʻano tweak.
E lana i kahi mea i koe
- papa = "huki-hema"
- . huki - hema {
- lana : hema ;
- }
E lana pono i kekahi mea
- papa = "huki-'ākau"
- . huki - ʻākau {
- lana : pololei ;
- }
E hoʻololi i ke kala o kekahi mea i#999
- papa = "muted"
- . leo {
- kala : #999;
- }
Hoʻomaʻemaʻe i ka float
ma luna o kekahi mea
- papa = "hoʻomaʻemaʻe"
- . clearfix {
- * zoom : 1 ;
- &: mamua ,
- &: ma hope o {
- hōʻike : papaʻaina ;
- maʻiʻo : "" ;
- }
- &: ma hope o {
- maopopo : laua ;
- }
- }