Kujambula
Zolemba ndi zitsanzo za kalembedwe ka Bootstrap, kuphatikiza zosintha zapadziko lonse lapansi, mitu, zolemba zathupi, mindandanda, ndi zina zambiri.
Bootstrap imayika mawonedwe oyambira padziko lonse lapansi, typography, ndi masitayilo a ulalo. Pakafunika kuwongolera kwambiri, yang'anani makalasi ogwiritsira ntchito malemba .
- Gwiritsani ntchito masanjidwe amtundu omwe amasankha zabwino
font-family
kwambiri pa OS ndi chipangizo chilichonse. - Kuti mukhale ndi mtundu wophatikizika komanso wofikirika, timaganiza kuti msakatuli wosasintha
font-size
(nthawi zambiri 16px) kuti alendo azitha kusintha makonda awo ngati pakufunika. - Gwiritsani ntchito
$font-family-base
,$font-size-base
, ndi mawonekedwe$line-height-base
monga maziko athu a typographic akugwiritsidwa ntchito ku<body>
. - Khazikitsani mtundu wa ulalo wapadziko lonse kudzera
$link-color
ndikugwiritsa ntchito mizere ya ulalo pa:hover
. - Gwiritsani
$body-bg
ntchito kukhazikitsa abackground-color
pa<body>
(#fff
mwachisawawa).
Masitayilo awa atha kupezeka mkati _reboot.scss
, ndipo zosintha zapadziko lonse lapansi zimatanthauzidwa mu _variables.scss
. Onetsetsani kuti $font-size-base
mwalowa rem
.
Mitu yonse ya HTML, <h1>
kupyolera mu <h6>
, ilipo.
Mutu | Chitsanzo |
---|---|
|
h1 ndi. Mutu wa bootstrap |
|
h2 ndi. Mutu wa bootstrap |
|
h3 ndi. Mutu wa bootstrap |
|
h4 ndi. Mutu wa bootstrap |
|
h5 ndi. Mutu wa bootstrap |
|
h6 ndi. Mutu wa bootstrap |
.h1
kudzera .h6
m'makalasi amapezekanso, chifukwa mukafuna kufananiza masitayilo amutu koma osagwiritsa ntchito chinthu chogwirizana ndi HTML.
h1 ndi. Mutu wa bootstrap
h2 ndi. Mutu wa bootstrap
h3 ndi. Mutu wa bootstrap
h4 ndi. Mutu wa bootstrap
h5 ndi. Mutu wa bootstrap
h6 ndi. Mutu wa bootstrap
<p class="h1">h1. Bootstrap heading</p>
<p class="h2">h2. Bootstrap heading</p>
<p class="h3">h3. Bootstrap heading</p>
<p class="h4">h4. Bootstrap heading</p>
<p class="h5">h5. Bootstrap heading</p>
<p class="h6">h6. Bootstrap heading</p>
Gwiritsani ntchito makalasi ophatikizidwa kuti mulembenso mutu wawung'ono wachiwiri kuchokera ku Bootstrap 3.
Mitu yachikhalidwe idapangidwa kuti izigwira bwino ntchito patsamba lanu. Mukafuna mutu kuti muwoneke bwino, ganizirani kugwiritsa ntchito mutu wowonetsera - wokulirapo, wamutu wamutu wokulirapo pang'ono.
Chiwonetsero 1 |
Chiwonetsero 2 |
Chiwonetsero 3 |
Chiwonetsero 4 |
Pangani ndime kukhala yodziwika bwino powonjezera .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Chifukwa chake, si commodo luctus.
<p class="lead">
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
</p>
Kukongoletsedwa kwazinthu zodziwika bwino za HTML5.
Mutha kugwiritsa ntchito chizindikirocho kutiwunikiranimawu.
Mzerewu walemba uyenera kutengedwa ngati malemba ochotsedwa.
Mzerewu uyenera kuwonedwa ngati wosalondola.
Mzerewu walemba uyenera kutengedwa ngati chowonjezera pa chikalatacho.
Mzere wa mawuwa uwonetsa ngati watsindikira
Mzere wa mawu awa akuyenera kuwonedwa ngati kusindikizidwa bwino.
Mzerewu wamasuliridwa ngati mawu akuda kwambiri.
Mzerewu wamasuliridwa ngati mawu opendekera.
<p>You can use the mark tag to <mark>highlight</mark> text.</p>
<p><del>This line of text is meant to be treated as deleted text.</del></p>
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
<p><u>This line of text will render as underlined</u></p>
<p><small>This line of text is meant to be treated as fine print.</small></p>
<p><strong>This line rendered as bold text.</strong></p>
<p><em>This line rendered as italicized text.</em></p>
.mark
ndipo .small
makalasi amapezekanso kuti agwiritse ntchito masitayelo omwewo <mark>
komanso <small>
ndikupewa zosokoneza zilizonse zomwe ma tag angabweretse.
Ngakhale sizinawonetsedwe pamwambapa, omasuka kugwiritsa ntchito <b>
komanso <i>
mu HTML5. <b>
cholinga chake ndi kuwunikira mawu kapena ziganizo popanda kuwonetsa kufunikira kowonjezera pomwe <i>
nthawi zambiri zimakhala za mawu, mawu aukadaulo, ndi zina.
Sinthani kamvekedwe ka mawu, sinthani, masitayilo, kulemera, ndi mtundu ndi zida zathu zamawu ndi utoto .
Kukhazikitsa kosinthika kwa chinthu cha HTML <abbr>
chofupikitsa ndi ma acronyms kuti awonetse mtundu wokulitsidwa pa hover. Mafupipafupi amakhala ndi mzere wokhazikika ndipo amapeza cholozera chothandizira kuti apereke zina zowonjezera pa hover ndi kwa ogwiritsa ntchito matekinoloje othandizira.
Onjezani .initialism
ku chidule cha kukula kwa mawonekedwe ang'onoang'ono.
attr
HTML
<p><abbr title="attribute">attr</abbr></p>
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr></p>
Kuti mugwire mawu midadada kuchokera kugwero lina mkati mwazolemba zanu. Manga <blockquote class="blockquote">
mozungulira HTML iliyonse ngati mawu.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere ndi ante.
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
</blockquote>
Onjezani a <footer class="blockquote-footer">
kuti muzindikire kochokera. Manga dzina la gwero la ntchitoyo mu <cite>
.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere ndi ante.
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
Gwiritsani ntchito zolembera ngati pakufunika kusintha kusintha kwa blockquote yanu.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere ndi ante.
<blockquote class="blockquote text-center">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere ndi ante.
<blockquote class="blockquote text-right">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
Chotsani malire okhazikika list-style
ndi akumanzere pazida zamndandanda (ana apompopompo okha). Izi zimagwiranso ntchito pa mndandanda wazinthu zomwe zangotsala pang'ono za ana , kutanthauza kuti mudzafunikanso kuwonjezera kalasi pamndandanda uliwonse womwe wasungidwa.
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem ndi massa
- Facilisis mu pretium nisl aliquet
- Chotsatira cha volutpat aliquam velit
- Phasellus iaculis neque
- Purus sodales ultricies
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
- Faucibus porta lacus fringilla vel
- Aenean sit amet erat nunc
- Eget porttitor lorem
<ul class="list-unstyled">
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit
<ul>
<li>Phasellus iaculis neque</li>
<li>Purus sodales ultricies</li>
<li>Vestibulum laoreet porttitor sem</li>
<li>Ac tristique libero volutpat at</li>
</ul>
</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ul>
Chotsani zipolopolo za mndandanda ndikuyika kuwala margin
kophatikiza magulu awiri, .list-inline
ndi .list-inline-item
.
- Lorem ipsum
- Phasellus iaculis
- Nulla volutpat
<ul class="list-inline">
<li class="list-inline-item">Lorem ipsum</li>
<li class="list-inline-item">Phasellus iaculis</li>
<li class="list-inline-item">Nulla volutpat</li>
</ul>
Gwirizanitsani mawu ndi mafotokozedwe molunjika pogwiritsa ntchito makalasi omwe tafotokozeratu (kapena ma semantic mixin). Pamawu ataliatali, mutha kuwonjezera .text-truncate
kalasi kuti muchepetse mawuwo ndi ellipsis.
- Mndandanda wamafotokozedwe
- Mndandanda wamafotokozedwe ndi abwino kufotokozera mawu.
- Euismod
-
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id ili si mi porta gravida ndi eget metus.
- Malesuada porta
- Etiam porta sem malesuada magna mollis euismod.
- Mawu odulidwa amadulidwa
- Fusce dapibus, tellus ac cursus commodo, tor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
- Nesting
-
- Mndandanda wa matanthauzo okhazikika
- Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc.
<dl class="row">
<dt class="col-sm-3">Description lists</dt>
<dd class="col-sm-9">A description list is perfect for defining terms.</dd>
<dt class="col-sm-3">Euismod</dt>
<dd class="col-sm-9">
<p>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</p>
<p>Donec id elit non mi porta gravida at eget metus.</p>
</dd>
<dt class="col-sm-3">Malesuada porta</dt>
<dd class="col-sm-9">Etiam porta sem malesuada magna mollis euismod.</dd>
<dt class="col-sm-3 text-truncate">Truncated term is truncated</dt>
<dd class="col-sm-9">Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
<dt class="col-sm-3">Nesting</dt>
<dd class="col-sm-9">
<dl class="row">
<dt class="col-sm-4">Nested definition list</dt>
<dd class="col-sm-8">Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc.</dd>
</dl>
</dd>
</dl>
Mayankhidwe kalembedwe amatanthawuza kukweza mawu ndi zigawo zake pongosintha mizu yomwe ili font-size
mkati mwa mafunso atolankhani. Bootstrap sichimakuchitirani izi, koma ndizosavuta kuwonjezera ngati mukuzifuna.
Pano pali chitsanzo cha izo pochita. Sankhani chilichonse chomwe font-size
mukufuna komanso pazama media.