Source

Kujambula

Zolemba ndi zitsanzo za kalembedwe ka Bootstrap, kuphatikiza zosintha zapadziko lonse lapansi, mitu, zolemba zathupi, mindandanda, ndi zina zambiri.

Zokonda padziko lonse lapansi

Bootstrap imayika mawonedwe oyambira padziko lonse lapansi, typography, ndi masitayilo a ulalo. Mukafunika kuwongolera kwambiri, yang'anani makalasi ogwiritsira ntchito malemba .

  • Gwiritsani ntchito masanjidwe amtundu omwe amasankha zabwino font-familykwambiri 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-basemonga maziko athu a typographic akugwiritsidwa ntchito ku <body>.
  • Khazikitsani mtundu wa ulalo wapadziko lonse kudzera $link-colorndikugwiritsa ntchito mizere ya ulalo pa :hover.
  • Gwiritsani $body-bgntchito kukhazikitsa a background-colorpa <body>( #fffmwachisawawa).

Masitayilo awa atha kupezeka mkati _reboot.scss, ndipo zosintha zapadziko lonse lapansi zimatanthauzidwa mu _variables.scss. Onetsetsani kuti $font-size-basemwalowa rem.

Mitu

Mitu yonse ya HTML, <h1>kupyolera mu <h6>, ilipo.

Mutu Chitsanzo

<h1></h1>

h1 ndi. Mutu wa bootstrap

<h2></h2>

h2 ndi. Mutu wa bootstrap

<h3></h3>

h3 ndi. Mutu wa bootstrap

<h4></h4>

h4 ndi. Mutu wa bootstrap

<h5></h5>

h5 ndi. Mutu wa bootstrap

<h6></h6>

h6 ndi. Mutu wa bootstrap
<h1>h1. Bootstrap heading</h1>
<h2>h2. Bootstrap heading</h2>
<h3>h3. Bootstrap heading</h3>
<h4>h4. Bootstrap heading</h4>
<h5>h5. Bootstrap heading</h5>
<h6>h6. Bootstrap heading</h6>

.h1kudzera .h6m'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>

Kusintha mitu

Gwiritsani ntchito makalasi ophatikizidwa kuti mulembenso mutu wawung'ono wachiwiri kuchokera ku Bootstrap 3.

Mutu wowoneka bwino Wokhala ndi mawu achiwiri ozimiririka

<h3>
  Fancy display heading
  <small class="text-muted">With faded secondary text</small>
</h3>

Onetsani mitu

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. Kumbukirani kuti mitu iyi simayankhidwa mwachisawawa, koma ndizotheka kuyatsa makulidwe a font .

Chiwonetsero 1
Chiwonetsero 2
Chiwonetsero 3
Chiwonetsero 4
<h1 class="display-1">Display 1</h1>
<h1 class="display-2">Display 2</h1>
<h1 class="display-3">Display 3</h1>
<h1 class="display-4">Display 4</h1>

Kutsogolera

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>

Zolemba zapaintaneti

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>

.markndipo .smallmakalasi 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.

Zothandizira zolemba

Sinthani kamvekedwe ka mawu, sinthani, masitayilo, kulemera, ndi mtundu ndi zida zathu zamawu ndi utoto .

Chidule cha mawu

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 .initialismku 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>

Zolemba za block

Kuti mugwire mawu midadada kuchokera kugwero lina mkati mwazolemba zanu. Mangirirani HTML<blockquote class="blockquote"> 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>

Kutchula gwero

Onjezani a <footer class="blockquote-footer">kuti muzindikire kochokera. Manga dzina la gwero ntchito mu <cite>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere ndi ante.

Wina wotchuka mu Source Title
<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>

Kuyanjanitsa

Gwiritsani ntchito zolembera ngati pakufunika kusintha kusintha kwa blockquote yanu.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere ndi ante.

Wina wotchuka mu Source Title
<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.

Wina wotchuka mu Source Title
<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>

Mndandanda

Osatchulidwa

Chotsani malire okhazikika list-stylendi 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
    • Zakudya za Purus sodales
    • 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>

Motsatana

Chotsani zipolopolo za mndandanda ndikuyika kuwala marginkophatikiza magulu awiri, .list-inlinendi .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>

Kuyika mndandanda wamafotokozedwe

Gwirizanitsani mawu ndi mafotokozedwe molunjika pogwiritsa ntchito makalasi omwe tafotokozeratu (kapena ma semantic mixin). Pamawu ataliatali, mutha kuwonjezera .text-truncatekalasi kuti muchepetse mawuwo ndi ellipsis.

Mndandanda wamafotokozedwe
Mndandanda wofotokozera ndi wabwino 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>

Makulidwe amitundu omvera

Sitima yapamadzi ya Bootstrap v4.3 yokhala ndi mwayi wopangitsa kuti mafonti azimvera, kulola kuti mawu azikula mwachilengedwe pazida zonse ndi kukula kwa mawonekedwe. RFS ikhoza kuthandizidwa posintha kusintha kwa $enable-responsive-font-sizesSass truendi kubwezeretsanso Bootstrap.

Kuti tithandizire RFS , timagwiritsa ntchito chosakaniza cha Sass kuti tisinthe zinthu zathu zonse font-size. Mafonti omvera adzaphatikizidwa kukhala calc()ntchito zosakanikirana remndi mayunitsi owonera kuti athe kuyankha mokweza. Zambiri za RFS ndi kasinthidwe kake zitha kupezeka pankhokwe yake ya GitHub .