Ba éléments HTML ya fondamental oyo esalemi na style mpe ematisami na ba classes extensibles.
Mitó ya makambo nyonso ya HTML, <h1>
na nzela <h6>
ezali.
Bootstrap ya mokili mobimba ya liboso font-size
ezali 14px , na a line-height
ya 20px . Yango esalelami mpo na <body>
mpe baparagrafe nyonso. En plus, <p>
(paragraphes) ezuaka marge ya se ya ndambo ya line-height na bango (10px par défaut).
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus na magnis ya kobota, nascetur ridiculus mus. Nullam id dolor id nibh ultricies mituka.
Cum sociis natoque penatibus na magnis ya kobota, nascetur ridiculus mus. Donec ullamcorper nulla oyo ezali na mbongo te. Duis mollis, est non commodo luctus, nisi erat ligula ya porte, eget lacinia odio sem nec elit. Donec ullamcorper nulla oyo ezali na mbongo te.
Maecenas sed diam eget risus varius blandit efandi amet non magna. Donec id elit non mi porta gravida na eget metus. Duis mollis, est non commodo luctus, nisi erat ligula ya porte, eget lacinia odio sem nec elit.
<p> ... </p>
Salá ete paragrafe moko ezala polele na kobakisáká .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor motɛkisi ya mbongo. Duis mollis, est oyo ezali na mbongo te.
<p kelasi = "kokamba" > ... </p>
Échelle typographique esalemi na ba variables mibale ya LESS na ba variables.less : @baseFontSize
na @baseLineHeight
. Ya liboso ezali base font-size oyo esalelami na mobimba mpe ya mibale ezali base line-height. Tosalelaka ba variables wana mpe mwa matematiki ya pete mpo na kosala ba marges, ba paddings, mpe ba line-heights ya lolenge na biso nyonso mpe mingi mosusu. Personnaliser bango pe Bootstrap ezo adapter.
Salelá bilembo ya kotya likebi na ndenge ya liboso ya HTML oyo ezali na mitindo ya pɛpɛlɛ.
<small>
Mpo na kolongola likebi na kati ya molɔngɔ to na ba blocs ya makomi, salelá mwa elembo.
Molongo oyo ya makomi ezali mpo na kotalela yango lokola makomi ya mikemike.
<p> <moke> Molongo oyo ya makomi ezali mpo na kotalela yango lokola makomi ya malamu. </moke> </p>
Mpo na kopesa ntina na mwa ndambo ya makomi oyo ezali na kilo ya font oyo ezali kilo mingi.
Eteni ya makomi oyo elandi ebongolami lokola makomi ya moindo makasi .
<strong> ebongolami lokola makomi ya moindo makasi </strong>
Mpo na konyata mwa ndambo ya makomi oyo ezali na makomi ya italike.
Eteni ya makomi oyo elandi ebongolami lokola makomi oyo ezali na italike .
<em> ebongolami lokola makomi ya italike </em>
Mitó likoló!Bozala na bonsomi ya kosalela <b>
mpe <i>
na HTML5. <b>
ezali mpo na kobimisa maloba to bafraze kozanga kopesa ntina mosusu nzokande <i>
ezali mingimingi mpo na mongongo, maloba ya tekiniki, mpe bongo na bongo.
Facile réaligner texte na ba composants na ba classes ya alignment ya texte.
Makomi oyo ezali na molɔngɔ na lobɔkɔ ya mwasi.
Mokanda oyo ezali na molɔngɔ na katikati.
Mokanda oyo ezali na molɔngɔ na lobɔkɔ ya mobali.
- <p class = "text-left" > Mokanda oyo ekangami na lobɔkɔ ya mwasi. </p>
- <p class = "text-center" > Mokanda oyo ekangami na katikati . </p>
- <p class = "text-right" > Mokanda oyo ekangami na loboko ya mobali. </p>
Kopesa ndimbola na nzela ya langi na mwa ndambo ya bakelasi ya utilité ya accent.
Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.
Etiam porta sem malesuada ya monene ya mollis euismod.
Donec ullamcorper nulla oyo ezali na mbongo te.
Aenean eu leo quam. Pellentesque ornare na yango ezali na nzoto kolɔngɔnɔ.
Duis mollis, est non commodo luctus, nisi erat ligula ya porte.
- <p classe = "kokanga mongongo" > Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh. </p>
- <p class = "kebisi ya makomi" > Etiam porta sem malesuada magna mollis euismod. </p>
- <p class = "libunga-ya-makomi" > Donec ullamcorper nulla non metus aucteur fringilla. </p>
- <p classe = "mayebisi-makomi" > Enean eu leo quam. Pellentesque ornare na yango ezali na nzoto kolɔngɔnɔ. </p>
- <p classe = "elonga ya makomi" > Duis mollis, est non commodo luctus, nisi erat porttitor ligula. </p>
Implémentation stylisée ya <abbr>
élément ya HTML pona ba abréviations na ba sigles pona kolakisa version élargie na hover. Ba abréviations oyo ezali na title
attribut ezali na ndelo ya nse oyo ezali na ba points ya pete mpe curseur ya lisalisi na hover, kopesaka contexte ya kobakisa na hover.
<abbr>
Mpo na makomi oyo epanzani na hover molai ya abréviation, kotia title
attribut.
Bokuse ya liloba attribut ezali attr .
<abbr title = "eloko" > attr </abbr>
<abbr class="initialism">
Bakisa .initialism
na abréviation mpo na font-size ya mwa moke.
HTML ezali eloko ya malamu koleka banda mampa oyo bakati na biteni.
<abbr title = "Monoko ya bilembo ya makomi ya likolo" class = "initialisme" > HTML </abbr>
Lakisa ba informations ya contact pona koko oyo azali pene to nzoto mobimba ya mosala.
<address>
Bobatela formatage na kosukisa milɔngɔ nyonso na <br>
.
- <addresse>
- <strong> Twitter, Inc. </strong><br>
- 795 Folsom Ave, Suite 600 na mokili mobimba
- San Francisco, CA 94107 <br>
- <abbr motó ya likambo = "Telephone" > P: </abbr> (123) 456-7890
- </addresse>
- <addresse>
- <strong> Nkombo mobimba </strong><br>
- <a href = "mailto:#" > ya liboso.ya [email protected] </a>
- </addresse>
Mpo na kozongela ba blocs ya contenus oyo ewutaki na source mosusu na kati ya mokanda na yo.
Zinga HTML<blockquote>
nyonso lokola citatio. Mpo na ba citations droites tozali ko recommander a .<p>
Lorem ipsum dolor vanda amet, consectetur elit oyo ezo boma nzoto. Motango mobimba posuere erat a ante.
- <bokangami ya maloba>
- <p> Lorem ipsum dolor vandi amet, consectetur adipiscing elit. Motango mobimba posuere erat a ante. </p>
- </blockquote ya maloba>
Style mpe contenus ebongwanaka mpo na ba variations simples na blockquote standard.
Bakisa <small>
tag mpo na koyeba source. Zinga kombo ya mosala ya source na <cite>
.
Lorem ipsum dolor vanda amet, consectetur elit oyo ezo boma nzoto. Motango mobimba posuere erat a ante.
Moto moko ya lokumu na Source Title
- <bokangami ya maloba>
- <p> Lorem ipsum dolor vandi amet, consectetur adipiscing elit. Motango mobimba posuere erat a ante. </p>
- <moke> Moto moko ya lokumu <cite title = "Titre ya source" > Titre ya source </cite></small>
- </blockquote ya maloba>
Salelá .pull-right
mpo na blocquote oyo ezali kopumbwapumbwa, oyo ezali na boyokani na lobɔkɔ ya mobali.
- <blockquote classe = "kobenda-na loboko ya mobali" >
- ...
- </blockquote ya maloba>
Liste ya biloko oyo kati na yango molongo ezali na ntina polele te .
- <ul>
- <li> ... </li>
- </ul>
Liste ya biloko oyo kati na yango molongo ezali na ntina polele.
- <ol>
- <li> ... </li>
- </ol>
Longola padding ya default list-style
mpe ya gauche na biloko ya liste (bana ya mbala moko kaka).
- <ul classe = "ezali na style te" >
- <li> ... </li>
- </ul>
Tia biloko nyonso ya liste na molongo moko na inline-block
mpe mwa padding ya pole.
- <ul classe = "na kati ya molongo" >
- <li> ... </li>
- </ul>
Liste ya maloba oyo ezali na bandimbola oyo ezali na boyokani na yango.
- <dl>
- <dt> ... </dt> oyo azali na bomoi
- <dd> ... </dd>
- </dl>
Salá maloba mpe bandimbola na <dl>
molɔngɔ pembenipembeni.
- <dl kelasi = "dl-horizontal" >
- <dt> ... </dt> oyo azali na bomoi
- <dd> ... </dd>
- </dl>
Mitó likoló!Ba liste ya ba déscriptions horizontales ekokata ba termes oyo ezali milayi mingi pona kokota na fix ya colonne gauche text-overflow
. Na ba portes de vue ya moke, bakobongwana na layout ya stacked par défaut.
Envelopper ba fragments ya code inline na <code>
.
<section>
esengeli kozingama lokola inline.
- Ndakisa , <code > & lt ; eteni & gt ;</ code > esengeli kozingama lokola inline .
Salelá <pre>
mpo na milɔngɔ́ mingi ya code. Kobosana te kokima ba parenthèses nionso ya angle na code mpo na kosala rendu malamu.
<p>Ezalela ya makomi awa...</p>
- <liboso>
- <p>Ndakisa ya makomi awa...</p>
- </pre>
Mitó likoló!Kobosana te kobatela code na kati ya <pre>
bilembo pene na lobɔkɔ ya mwasi soki likoki ezali; ekosala ba onglets nionso.
Okoki kobakisa na bolingi .pre-scrollable
kelasi oyo ekotia max-hauteur ya 350px mpe ekopesa barre de défilement ya axe y.
Mpo na kosala styling ya moboko —padding ya pole mpe bobele bakaboli ya horizontal —bakisá kelasi ya moboko .table
na nyonso <table>
.
# . | Prenom | Nkombo ya libota | Nkombo ya mosaleli |
---|---|---|---|
1. 1. | Marko | Otto | @mdo |
2. 2 | Yakobo | Thornton oyo azali | @mafuta |
3 | Larry, moto oyo azali | Ndɛkɛ yango | @twitter na twitter |
- < kelasi ya mesa = "mesa" >
- ...
- </tableau>
Bakisa moko ya bakelasi oyo elandi na kelasi ya .table
moboko.
.table-striped
Abakisi zebra-striping na molongo nyonso ya tableau na kati ya <tbody>
via :nth-child
CSS selector (ezali te na IE7-8).
# . | Prenom | Nkombo ya libota | Nkombo ya mosaleli |
---|---|---|---|
1. 1. | Marko | Otto | @mdo |
2. 2 | Yakobo | Thornton oyo azali | @mafuta |
3 | Larry, moto oyo azali | Ndɛkɛ yango | @twitter na twitter |
- <tableau classe = "tableau-rayé" >
- ...
- </tableau>
.table-bordered
Bakisa bandelo mpe ba coins ya rond na mesa.
# . | Prenom | Nkombo ya libota | Nkombo ya mosaleli |
---|---|---|---|
1. 1. | Marko | Otto | @mdo |
Marko | Otto | @kozwa molongo ya botimo | |
2. 2 | Yakobo | Thornton oyo azali | @mafuta |
3 | Larry ndeke | @twitter na twitter |
- < classe ya tableau = "tableau oyo ezali na ndelo ya tableau" >
- ...
- </tableau>
.table-hover
Activer état ya hover na ba lignes ya tableau na kati ya <tbody>
.
# . | Prenom | Nkombo ya libota | Nkombo ya mosaleli |
---|---|---|---|
1. 1. | Marko | Otto | @mdo |
2. 2 | Yakobo | Thornton oyo azali | @mafuta |
3 | Larry ndeke | @twitter na twitter |
- < classe ya tableau = "tableau-hover" >
- ...
- </tableau>
.table-condensed
Esalaka ba tables compact mingi na kokata ba remplissage ya cellule na kati.
# . | Prenom | Nkombo ya libota | Nkombo ya mosaleli |
---|---|---|---|
1. 1. | Marko | Otto | @mdo |
2. 2 | Yakobo | Thornton oyo azali | @mafuta |
3 | Larry ndeke | @twitter na twitter |
- < classe ya tableau = "tableau-condensé" >
- ...
- </tableau>
Salelá bakelasi ya contexte mpo na kopesa langi na milɔngɔ ya tableau.
Kelasi | Ndimbola |
---|---|
.success |
Ezali komonisa likambo oyo elongi to oyo esalemi malamu. |
.error |
Ezali komonisa likambo moko ya likama to oyo ekoki kozala mabe. |
.warning |
Ezali komonisa likebisi oyo ekoki kozala na mposa ya kotya likebi. |
.info |
Esalemi lokola alternative na ba styles ya défaut. |
# . | Eloko | Kofuta Ezwami | Statut |
---|---|---|---|
1. 1. | TB - Sanza na sanza | 01/04/2012 na mokolo ya 01/04 | Kondima |
2. 2 | TB - Sanza na sanza | 02/04/2012 na mokolo ya 02/04 | Eboyaki |
3 | TB - Sanza na sanza | 03/04/2012 na mokolo ya 03/04 | Kozelisa |
4. | TB - Sanza na sanza | 04/04/2012 na mokolo ya 04/04 | Benga na kati mpo na kondimisa |
- ...
- < tr classe = "elonga" >
- <td> 1 < /td> Ezali ndenge nini?
- <td>TB - Sanza na sanza</ td >
- <td> 01 / 04 / 2012 < /td> Ezali ndenge nini?
- <td>Endimami</ td >
- </ tr >
- ...
Liste ya ba éléments HTML ya tableau oyo esungami mpe ndenge nini esengeli kosalela yango.
Kotya eelmbo | Ndimbola |
---|---|
<table> |
Elemento ya enveloppe mpo na kolakisa ba données na format tabulaire |
<thead> |
Elemento ya conteneur mpo na milɔngɔ́ ya motó ya tableau ( <tr> ) mpo na kopesa bilembo na makonzí ya tableau |
<tbody> |
Elemento ya récipient mpo na ba lignes ya tableau ( <tr> ) na nzoto ya tableau |
<tr> |
Elemento ya récipient mpo na ensemble ya ba cellules ya tableau ( <td> to <th> ) oyo emonanaka na molongo moko |
<td> |
Cellule ya tableau par défaut |
<th> |
Cellule ya tableau spécial pona ba étiquettes ya colonne (to molongo, selon portée na placement). |
<caption> |
Bolimbisi to bokuse ya makambo oyo tableau ezali na yango, mingimingi ezali na ntina mpo na batángi ya écran |
- <mesa>
- <maloba ya nse> ... </maloba ya nse>
- <motó>
- <tr>
- <th> ... </th>
- <th> ... </th>
- </tr>
- </thead>
- <nzoto>
- <tr>
- <td> ... </td>
- <td> ... </td>
- </tr>
- </tbody>
- </tableau>
Ba contrôles ya formulaire individuel ezuaka styling, kasi sans classe ya base oyo esengeli na <form>
to ba changements minene na marquage. Esali que ba étiquettes empilé, oyo ezo aligné na gauche likolo ya ba contrôles ya formulaire.
- <lolenge>
- <ensemble ya bilanga>
- <lisapo> Lisapo </lisapo>
- <label> Nkombo ya étiquette </label>
- <input type = "text" placeholder = "Kokoma eloko moko..." >
- <span class = "help-block" > Ndakisa ya makomi ya lisalisi ya niveau ya bloc awa. </span>
- <label class = "boîte de coche" >
- <input type = "checkbox" > Tala ngai
- </étiquette>
- <button type = "tinda" classe = "btn" > Tinda </button>
- </esika ya bilanga>
- </forme>
Esangisi na Bootstrap ezali na ba layouts misato ya formulaire optionnels mpo na ba cas ya usage commun.
Bakisa .form-search
na formulaire mpe .search-query
na <input>
mpo na bokoti ya makomi ya extra-rond.
- < kelasi ya formulaire = "formule-boluka" >
- < lolenge ya bokoti = "mokanda" kelasi = "motuna-boluka-moyen ya bokoti" >
- < lolenge ya bouton = "tinda" classe = "btn" > Boluka </bouton>
- </forme>
Bakisa .form-inline
mpo na ba étiquettes aligné na gauche mpe ba contrôles inline-block mpo na layout compact.
- < kelasi ya formulaire = "formule-inline" >
- < lolenge ya bokoti = "mokanda" kelasi = "bokoti-moke" esika = "Email" >
- < lolenge ya bokoti = "mot ya nzela" classe = "bokoti-moke" esika = "Mot ya nzela" >
- <label class = "boîte de coche" >
- <input type = "checkbox" > Bokanisa ngai
- </étiquette>
- < lolenge ya bouton = "tinda" classe = "btn" > Bokota </button>
- </forme>
Bobongisa ba étiquettes na droite mpe bo flotter yango na gauche mpo ebima na ligne moko na ba contrôles. Esengaka mbongwana ya bilembo mingi uta na formulaire ya liboso:
.form-horizontal
na formulaire.control-group
.control-label
na étiquette.controls
pona alignment ya bien
- < kelasi ya lolenge = "formule-horizontal" >
- <div class = "etuluku-ya-bokonzi" >
- <label class = "étiquette-contrôle" mpo na = "Email ya kokotisa" > Email </label>
- <div classe = "ba contrôles" >
- < lolenge ya bokoti = "mokomi " id = "Email ya bokoti" esika ya esika = "Email" >
- </div>
- </div>
- <div class = "etuluku-ya-bokonzi" >
- <label class = "contrôle-étiquette" mpo na = "inputPassword" > Mot ya nzela </label>
- <div classe = "ba contrôles" >
- < lolenge ya bokoti = "mot ya nzela" id = "Mot ya nzela ya bokoti" placeholder = "Mot ya nzela" >
- </div>
- </div>
- <div class = "etuluku-ya-bokonzi" >
- <div classe = "ba contrôles" >
- <label class = "boîte de coche" >
- <input type = "checkbox" > Bokanisa ngai
- </étiquette>
- < lolenge ya bouton = "tinda" classe = "btn" > Bokota </button>
- </div>
- </div>
- </forme>
Bandakisa ya ba contrôles ya formulaire standard oyo esungami na layout ya formulaire ya ndakisa.
Contrôle ya formulaire oyo emonanaka mingi, ba champs ya entrée basé na texte. Esangisi lisungi mpo na mitindo nyonso ya HTML5: makomi, mot de passe, datetime, datetime-local, date, sanza, ngonga, poso, nimero, email, url, boluki, tel, mpe langi.
Esengaka kosalela oyo elakisami type
na ntango nyonso.
- < lolenge ya bokoti = "mokanda" esika = "Bokotisi makomi" >
Contrôle ya formulaire oyo esimbaka ba lignes ebele ya texte. Bobongola rows
attribut soki esengeli.
- < milɔngɔ ya esika ya makomi = "3" ></esika ya makomi>
Ba cases ya kotiya bilembo ezali mpo na kopona option moko to mingi na liste ntango ba radios ezali mpo na kopona option moko kati na mingi.
- <label class = "boîte de coche" >
- < lolenge ya bokoti = "boîte de coche" motuya = "" >
- Nzela ya liboso ezali oyo mpe oyo —kobosana te kokɔtisa ntina oyo ezali malamu mpenza
- </étiquette>
- < kelasi ya étiquette = "radio" >
- < lolenge ya bokoti = "radio" kombo = "optionsRadios" id = "optionsRadios1" valeur = "option1" etiamaki elembo >
- Nzela ya liboso ezali oyo mpe oyo —kobosana te kokɔtisa ntina oyo ezali malamu mpenza
- </étiquette>
- < kelasi ya étiquette = "radio" >
- < lolenge ya bokoti = "radio" kombo = "baRadio ya ba options" id = "baRadio ya ba options2" valeur = "option2" >
- Option mibale ekoki kozala eloko mosusu mpe kopona yango ekolongola option moko
- </étiquette>
Bakisa .inline
kelasi na série ya ba cases to ba radios mpo ba contrôles ebima na ligne moko.
- <label class = "boîte de coche na kati ya molongo" >
- < lolenge ya bokoti = " boîte de coche" id = "boîte de contrôle na kati ya ligne1" valeur = "option1" > 1
- </étiquette>
- <label class = "boîte de coche na kati ya molongo" >
- < lolenge ya bokoti = " boîte de coche" id = "boîte de contrôle en ligne2" valeur = "option2" > 2
- </étiquette>
- <label class = "boîte de coche na kati ya molongo" >
- < lolenge ya bokoti = " boîte de coche" id = "boîte de contrôle na kati ya ligne3" valeur = "option3" > 3
- </étiquette>
Salelá option par défaut to lakisa a multiple="multiple"
mpo na kolakisa ba options ebele na mbala moko.
- <pona>
- <nzela> 1 </option>
- <nzela> 2 </option>
- <nzela> 3 </option>
- <nzela> 4 </option>
- <nzela> 5 </option>
- </pona>
- <pona ebele = "ebele" >
- <nzela> 1 </option>
- <nzela> 2 </option>
- <nzela> 3 </option>
- <nzela> 4 </option>
- <nzela> 5 </option>
- </pona>
Kobakisa likolo ya ba contrôles ya navigateur oyo ezali, Bootstrap ezali na ba composants misusu ya formulaire ya tina.
Bakisa makomi to ba boutons liboso to nsima ya bokɔti nyonso oyo esalemi na makomi. Sala note que select
ba éléments ezali soutenu te awa.
Zinga an .add-on
mpe an input
na moko ya bakelasi mibale mpo na kokanga liboso to kobakisa makomi na bokoti.
- <div class = "kokɔtisa-kosala liboso" >
- <span classe = "ebakisi" > @ </span>
- < classe ya bokoti = "span2" id = "Kokota liboso" lolenge = "mokanda" esika ya esika = "Nkombo ya mosaleli" >
- </div>
- <div class = "kokɔtisa-kobakisa" >
- < classe ya bokoti = "span2" id = "Kokota oyo ebakisami" lolenge = "mokanda" >
- <span classe = "ebakisi" > .00 </span>
- </div>
Salelá bakelasi nyonso mibale mpe bandakisa mibale ya .add-on
mpo na kosala liboso mpe kobakisa bokɔti moko.
- <div class = "kokɔtisa liboso ya kokɔtisa-kobakisa" >
- <span classe = "ebakisi" > $ </span>
- < classe ya bokoti = "span2" id = "Bokotisi oyo ebakisamiPrepended" type = "texte" >
- <span classe = "ebakisi" > .00 </span>
- </div>
Na esika ya a <span>
na makomi, salelá a .btn
mpo na kokangisa bouton moko (to mibale) na esika oyo bakomi.
- <div class = "kokɔtisa-kobakisa" >
- < classe d'entrée = "span2" id = "Bouton d'entrée oyo ebakisami" type = "texte" >
- <bouton classe = "btn" type = "bouton" > Kende! </bouton>
- </div>
- <div class = "kokɔtisa-kobakisa" >
- < classe d'entrée = "span2" id = "ba Boutons d'entrée oyo ebakisami" type = "texte" >
- <bouton classe = "btn" type = "button" > Boluka </bouton>
- <bouton classe = "btn" type = "bouton" > Ba options </bouton>
- </div>
- <div class = "kokɔtisa-kobakisa" >
- < classe ya bokoti = "span2" id = "Bouton ya kokita oyo ebakisami" type = "texte" >
- <div kelasi = "btn-etuluku" >
- <bouton classe = "btn kokita-toggle" data-toggle = "kokita" >
- Mosala
- <span kelasi = "caret" </span>
- </bouton>
- <ul class = "menu ya kokita" >
- ...
- </ul>
- </div>
- </div>
- <div class = "kokɔtisa-kosala liboso" >
- <div kelasi = "btn-etuluku" >
- <bouton classe = "btn kokita-toggle" data-toggle = "kokita" >
- Mosala
- <span kelasi = "caret" </span>
- </bouton>
- <ul class = "menu ya kokita" >
- ...
- </ul>
- </div>
- < classe ya bokoti = "span2" id = "Bouton ya kokita liboso" type = "texte" >
- </div>
- <div class = "kokɔtisa liboso ya kokɔtisa-kobakisa" >
- <div kelasi = "btn-etuluku" >
- <bouton classe = "btn kokita-toggle" data-toggle = "kokita" >
- Mosala
- <span kelasi = "caret" </span>
- </bouton>
- <ul class = "menu ya kokita" >
- ...
- </ul>
- </div>
- < classe ya bokoti = "span2" id = "Bouton ya kokita oyo ebakisamiPrepended" type = "texte" >
- <div kelasi = "btn-etuluku" >
- <bouton classe = "btn kokita-toggle" data-toggle = "kokita" >
- Mosala
- <span kelasi = "caret" </span>
- </bouton>
- <ul class = "menu ya kokita" >
- ...
- </ul>
- </div>
- </div>
- <lolenge>
- <div class = "kokɔtisa-kosala liboso" >
- <div kelasi = "btn-etuluku" > ... </div>
- < lolenge ya bokoti = "mokanda" >
- </div>
- <div class = "kokɔtisa-kobakisa" >
- < lolenge ya bokoti = "mokanda" >
- <div kelasi = "btn-etuluku" > ... </div>
- </div>
- </forme>
- < kelasi ya formulaire = "formule-boluka" >
- <div class = "kokɔtisa-kobakisa" >
- < lolenge ya bokoti = "mokanda" kelasi = "span2 boluki-motuna" >
- < lolenge ya bouton = "tinda" classe = "btn" > Boluka </bouton>
- </div>
- <div class = "kokɔtisa-kosala liboso" >
- < lolenge ya bouton = "tinda" classe = "btn" > Boluka </bouton>
- < lolenge ya bokoti = "mokanda" kelasi = "span2 boluki-motuna" >
- </div>
- </forme>
Salelá ba classes ya taille relative lokola .input-large
to ekokanisa ba entrées na yo na ba taille ya colonne ya grille na kosalelaka .span*
ba classes.
Sala que n'importe quel <input>
ou <textarea>
élément e se comporter lokola élément ya niveau ya bloc.
- < classe ya bokoti = "niveau-ya bloc-ya bokoti" type = "mokomi" placeholder = ".niveau-ya bloc-ya bokoti" >
- < classe ya entrée = "entrée-mini" type = "texte" placeholder = ".input-mini" >
- < classe ya bokoti = "bokoti-moke" lolenge = "mokanda" esika = " .bokoti -moke" >
- < classe ya bokoti = "moyen-ya bokoti" lolenge = "mokanda" ya esika = ".moyen ya bokoti " >
- < classe ya bokoti = "bokoti-monene" lolenge = "mokanda" esika = " .bokoti -monene" >
- < classe ya bokoti = "bokoti-xmonene" lolenge = "mokanda" esika = ".bokoti-xmonene" >
- < classe ya bokoti = "bokoti-xxmonene" lolenge = " mokomi" esika ya esika = ".bokoti-xxmonene" >
Mitó likoló!Na ba versions oyo ekoya, tokozala ko changer usage ya ba classes oyo ya entrée relative po ekokana na ba taille ya ba boutons na biso. Na ndakisa, .input-large
ekobakisa padding mpe font-size ya entrée moko.
Salelá .span1
to .span12
mpo na bokɔti oyo ekokani na bonene moko ya makonzí ya grille.
- < classe ya bokoti = "span1" lolenge = "mokanda" esika = ".span1" >
- < classe ya bokoti = "span2" lolenge = "mokanda" esika = ".span2" >
- < classe ya bokoti = "span3" lolenge = "mokanda" esika = ".span3" >
- <pona kelasi = "span1" >
- ...
- </pona>
- <pona kelasi = "span2" >
- ...
- </pona>
- <pona kelasi = "span3" >
- ...
- </pona>
Mpo na ba entrées ya grille ebele na ligne moko, salela .controls-row
classe ya modificateur mpo na espacement ya malamu . Ezali ko flotter ba entrées mpo na ko collapser blanc-espace, kotiya ba marges oyo esengeli, mpe ko effacer flotteur.
- <div classe = "ba contrôles" >
- < classe ya bokoti = "span5" lolenge = "mokanda" esika = ".span5" >
- </div>
- <div class = "ba contrôles-molongo" >
- < classe ya bokoti = "span4" lolenge = "mokanda" esika = ".span4" >
- < classe ya bokoti = "span1" lolenge = "mokanda" esika = ".span1" >
- </div>
- ...
Présenter ba données na formulaire oyo ezali éditable te sans kosalela marquage ya formulaire ya solo.
- <span class = "input-xlarge uneditable-input" > Mwa motuya awa </span>
Sukisa formulaire na groupe ya ba actions (boutons). Ntango otye yango na kati ya .form-actions
, ba boutons ekokɔta yango moko mpo na kozala na molɔngɔ na ba contrôles ya formulaire.
- <div class = "misala-ya lolenge" >
- < lolenge ya bouton = "tinda" classe = "btn btn-primary" > Bomba mbongwana </button>
- < lolenge ya bouton = "bouton" classe = "btn" > Bolongoli </bouton>
- </div>
Lisungi ya nivo ya kati mpe ya bloc mpo na makomi ya lisalisi oyo ebimaka zingazinga ya ba contrôles ya formulaire.
- < lolenge ya bokoti = "mokanda" ><span classe = "lisalisi-na molongo" > Mokanda ya lisalisi ya kati ya molongo </span>
- <input type = "text" ><span class = "help-block" > Bloc ya molai ya makomi ya lisalisi oyo epanzani na molongo ya sika mpe ekoki koleka molongo moko. </span>
Pesa makanisi na basaleli to bapaya na ba états ya ba réactions ya moboko na ba contrôles ya formulaire mpe ba étiquettes.
Tolongolaka ba outline
styles par défaut na ba contrôles ya formulaire mosusu mpe tosalelaka a box-shadow
na esika na yango mpo na :focus
.
- <input class = "input-xlarge" id = "focusedInput" type = "texte" valeur = "Oyo ezali focusé..." >
Ba entrées ya style na nzela ya fonctionnalité ya navigateur par défaut na :invalid
. Lakisa a type
, bakisa required
attribut soki esika ezali ya kopona te, mpe (soki ekoki) lakisa a pattern
.
Yango ezali te na ba versions ya Internet Explorer 7-9 mpo na bozangi ya lisungi mpo na ba pseudo selecteurs ya CSS.
- < classe ya bokoti = "span3" lolenge = "email" esengeli >
Bakisa disabled
attribut na entrée moko pona kopekisa entrée ya usager pe ko déclencher look ya mua différent.
- <input class = "input-xlarge" id = "disabledInput" type = "text" placeholder = "Bokotisi ekangami awa..." ekangami >
Bootstrap ezali na ba styles ya validation pona erreur, avertissement, info, na ba messages ya succès. Mpo na kosalela, bakisá kelasi oyo ebongi na oyo ezali zingazinga .control-group
.
- <div class = "kebisi ya etuluku ya bokonzi" >
- <label class = "contrôle-étiquette" mpo na = "inputWarning" > Bokotisi na likebisi </label>
- <div classe = "ba contrôles" >
- < lolenge ya bokoti = "mokanda" id = "Kebisi ya bokoti" >
- <span class = "help-inline" > Eloko moko ekoki kozala mabe </span>
- </div>
- </div>
- <div class = "libunga ya etuluku ya bokonzi" >
- <label class = "contrôle-étiquette" mpo na = "inputError" > Bokotisi na libunga </label>
- <div classe = "ba contrôles" >
- < lolenge ya bokoti = "mokanda" id = "Libunga ya bokoti" >
- <span class = "help-inline" > Svp bobongisa libunga </span>
- </div>
- </div>
- <div class = "info ya groupe ya contrôle" >
- <label class = "contrôle-étiquette" mpo na = "info ya kokotisa" > Kokota na info </label>
- <div classe = "ba contrôles" >
- < lolenge ya bokoti = "mokanda" id = "Mayebisi ya bokoti" >
- <span class = "help-inline" > Nkombo ya mosaleli esi ezwami </span>
- </div>
- </div>
- <div class = "succès ya groupe ya contrôle" >
- <label class = "contrôle-étiquette" mpo na = "inputSuccess" > Bokotisi na elonga </label>
- <div classe = "ba contrôles" >
- < lolenge ya bokoti = "mokanda" id = "Elonga ya bokoti" >
- <span class = "lisalisi-na molongo" > Woohoo! </span>
- </div>
- </div>
Bakisa ba classes na <img>
élément moko pona ko styler ba images facilement na projet nionso.
- <img src = "..." classe = "emg-ezali na rond" >
- <img src = "..." kelasi = "cercle-ya-img" >
- <img src = "..." kelasi = "img-polaroid" >
Mitó likoló! .img-rounded
mpe .img-circle
esalaka te na IE7-8 mpo na kozanga border-radius
lisungi.
140 bilembo na lolenge ya sprite, ezali na langi ya motane makasi (ya liboso) mpe ya mpɛmbɛ, epesami na Glyphicons .
Glyphicons Halflings ezalaka normalement gratuitement te, mais arrangement entre Bootstrap na ba créateurs ya Glyphicons esali que yango ezala possible sans frais pona yo en tant que ba développeurs. Comme merci, tosengi yo otia lien optionnel ya kozonga na Glyphicons chaque fois que ekozala pratique.
Ba icons nionso esengaka <i>
tag oyo ezali na classe unique, préfixé na icon-
. Mpo na kosalela yango, tyá code oyo elandi kaka esika nyonso:
- <i classe = "boluka-elembo" </i>
Ezali mpe na ba styles oyo ezali mpo na ba icônes inversées (ya pembe), oyo esalemi prêt na classe moko ya likolo. Toko enforcer spécifiquement classe oyo na hover na ba états actifs pona ba liens nav na dropdown.
- <i class = "elembo-luka elembo-mpembe" ></i>
Mitó likoló!Ntango ozali kosalela pembeni ya bansinga ya makomi, lokola na ba boutons to ba liens nav, kobosana te kotika esika nsima ya <i>
tag mpo na esika oyo ebongi.
Salelá yango na ba boutons, bituluku ya ba boutons mpo na barre ya bisaleli, navigation, to ba entrées ya formulaire prépendu.
- <div class = "btn-barre ya bisaleli" >
- <div kelasi = "btn-etuluku" >
- <a class = "btn" href = "#" ><i classe = "elembo-kobongisa-na-gauche" ></i></a>
- <a class = "btn" href = "#" ><i classe = "esika-ya-kobongisa-elembo" ></i></a>
- <a classe = "btn" href = "#" ><i classe = "elembo-kobongisa-na-na-na-na-likolo" </i></a>
- <a class = "btn" href = "#" ><i classe = "kobongisa-elembo-ya-kobongisa" ></i></a>
- </div>
- </div>
- <div kelasi = "btn-etuluku" >
- <a class = "btn btn-primary" href = "#" ><i class = "elembo-mosaleli elembo-mpembe" ></i> Mosaleli </a>
- <a class = "btn btn-kobalusama ya liboso" data-toggle = "kokita" href = "#" ><span classe = "caret" ></span></a>
- <ul class = "menu ya kokita" >
- <li><a href = "#" ><i classe = "elembo-krɛyo" </i> Bobongisi </a></li>
- <li><a href = "#" ><i classe = "elembo-bosɔtɔ" ></i> Bolongola </a></li>
- <li><a href = "#" ><i classe = "cercle-ya-epekiseli-ya-elembo" ></i> Bopekisa </a></li>
- <li kelasi = "mokabola" </li>
- <li><a href = "#" ><i classe = "ngai" ></i> Sala mokambi </a></li>
- </ul>
- </div>
- <a classe = "btn btn-monene" href = "#" ><i classe = "moto ya elembo" ></i> Monzoto </a>
- <a classe = "btn btn-moke" href = "#" ><i classe = "moto ya elembo" ></i> Monzoto </a>
- <a classe = "btn btn-mini" href = "#" ><i classe = "moto ya elembo" ></i> Monzoto </a>
- <ul kelasi = "nav nav-liste" >
- <li class = "active" ><a href = "#" ><i class = "elembo-ndako elembo-mpembe" </i> Ndako </a></li>
- <li><a href = "#" ><i classe = "buku-ya-bilili" </i> Bibliotɛkɛ </a></li>
- <li><a href = "#" ><i classe = "icon-crayon" </i> Misala </a></li>
- <li><a href = "#" ><i kelasi = "ngai" </i> Misc </a></li>
- </ul>
- <div class = "etuluku-ya-bokonzi" >
- <label class = "contrôle-étiquette" mpo na = "inputIcon" > Addresse ya email </label>
- <div classe = "ba contrôles" >
- <div class = "kokɔtisa-kosala liboso" >
- <span class = "kobakisa" ><i classe = "enveloppe-ya elembo" ></i></span>
- < classe ya bokoti = "span2" id = "Icon ya bokoti" lolenge = "mokanda" >
- </div>
- </div>
- </div>