Typography a wɔde kyerɛw nsɛm
Nwoma ne nhwɛsoɔ a ɛfa Bootstrap typography ho, a wiase nyinaa nhyehyɛɛ, nsɛmti, nipadua mu nsɛm, nsɛm a wɔahyehyɛ, ne nea ɛkeka ho ka ho.
Wiase nyinaa tebea horow
Bootstrap hyehyɛ wiase nyinaa nkyerɛkyerɛmu titiriw, typography, ne link styles. Sɛ ɛho hia sɛ wodi so pii a, hwɛ textual utility classes no .
- Fa native font stack a ɛpaw nea eye sen biara
font-family
ma OS ne mfiri biara di dwuma. - Sɛ wopɛ sɛ wonya type scale a ɛka ho na ɛyɛ mmerɛw a, yɛfa no sɛ browser default root
font-size
(taa yɛ 16px) sɛnea ɛbɛyɛ a nsrahwɛfo betumi ayɛ wɔn browser defaults sɛnea ɛho hia. - Fa
$font-family-base
,$font-size-base
, ne$line-height-base
su ahorow no di dwuma sɛ yɛn nkyerɛwee nnyinaso a yɛde dii dwuma wɔ<body>
. - Set wiase nyinaa link kɔla via
$link-color
na fa link underlines nkutoo di dwuma wɔ:hover
. - Fa di dwuma
$body-bg
de hyehyɛ abackground-color
wɔ<body>
(#fff
default so).
Wobetumi ahu saa akwan yi wɔ mu _reboot.scss
, na wɔakyerɛkyerɛ wiase nyinaa nsakrae ahorow no mu wɔ _variables.scss
. Hwɛ hu sɛ wode besi $font-size-base
hɔ rem
.
Nsɛmti ahorow
HTML asɛmti nyinaa, <h1>
kosi <h6>
, wɔ hɔ.
Asɛmti | Nhwɛsoɔ |
---|---|
|
h1. Bootstrap asɛmti no |
|
h2. Bootstrap asɛmti no |
|
h3. Bootstrap asɛmti no |
|
h4. Bootstrap asɛmti no |
|
h5. Bootstrap asɛmti no |
|
h6. Bootstrap asɛmti no |
.h1
through .h6
classes nso wɔ hɔ, ma bere a wopɛ sɛ wo ne font styling a ɛwɔ asɛmti bi mu no hyia nanso wuntumi mfa HTML element a ɛbata ho no nni dwuma.
h1. Bootstrap asɛmti no
h2. Bootstrap asɛmti no
h3. Bootstrap asɛmti no
h4. Bootstrap asɛmti no
h5. Bootstrap asɛmti no
h6. Bootstrap asɛmti no
Nsɛmti ahorow a wɔreyɛ no sɛnea wopɛ
Fa utility classes a ɛka ho no di dwuma fa san yɛ secondary heading text nketewa no fi Bootstrap 3 mu.
Fancy display heading Ne nsɛm a ɛto so abien a ayera
Kyerɛ nsɛmti ahorow
Wɔayɛ atetesɛm asɛmti nneɛma no sɛnea ɛbɛyɛ a ɛbɛyɛ adwuma yiye wɔ wo krataafa no mu nsɛm no nam mu. Sɛ wuhia asɛmti bi na ama woada nsow a, susuw ho sɛ wode asɛmti a wɔde bɛkyerɛ —asɛmti kwan a ɛsõ a ɛwɔ adwene kakra bedi dwuma. Ma ɛntena w’adwenem sɛ saa nsɛmti yi ntumi nyɛ adwuma default so, nanso ɛyɛ yiye sɛ wobɛma font sizes a ɛyɛ adwuma no ayɛ adwuma .
Nkyerɛkyerɛmu 1 |
Nkyerɛkyerɛmu 2 |
Nkyerɛkyerɛmu 3 |
Nkyerɛkyerɛmu 4 |
Di kan
Ma nkyekyem bi da nsow denam .lead
.
Vivamus sagittis lacus vel augue laoreet a ɛyɛ mmerɛw sɛ wobɛtɔ no. Duis mollis, est a ɛnyɛ ade a wɔde yɛ nneɛma.
Nsɛm a ɛwɔ nkyerɛwde mu no mu nneɛma
Styling ma inline HTML5 nneɛma a wɔtaa de di dwuma.
Wubetumi de agyiraehyɛde tag no adi dwuma deda no adiatwerɛ.
Wɔayɛ sɛ wɔbɛfa saa nsɛm a wɔahyehyɛ yi sɛ nsɛm a wɔapopa.
Wɔayɛ sɛ wɔbɛfa saa nkyerɛwee yi sɛ ɛnyɛ nokware bio.
Wɔayɛ sɛ wɔbɛfa saa nsɛm a wɔahyehyɛ yi sɛ ade a wɔde aka krataa no ho.
Saa nsɛm yi bɛkyerɛ ase sɛnea wɔatwe adwene asi so no
Wɔayɛ sɛ wɔbɛfa saa nsɛm a wɔakyerɛw no sɛ nkyerɛwde a ɛyɛ fɛ.
Wɔakyerɛ saa nkyerɛwde yi ase sɛ nsɛm a ɛyɛ tuntum.
Saa nkyerɛwde yi a wɔakyerɛ ase sɛ nsɛm a wɔakyerɛw no italics.
.mark
na .small
adesua ahorow nso wɔ hɔ a wɔde bedi dwuma wɔ ɔkwan koro no ara so sɛnea ɛte <mark>
ne <small>
bere a wɔrekwati nkyerɛase mu nkyerɛkyerɛmu biara a wɔmpɛ a tag ahorow no de bɛba no.
Bere a wɔankyerɛ wɔ atifi hɔ no, ntwentwɛn wo nan ase sɛ wode bedi dwuma <b>
na wode <i>
ahyɛ HTML5 mu. <b>
no kyerɛ sɛ ɛbɛtwe adwene asi nsɛmfua anaa nsɛmfua so a ɛrenkyerɛ hia foforo a ɛho hia bere a <i>
ɛyɛ nea ɛfa nne, mfiridwuma mu nsɛmfua, ne nea ɛkeka ho ho titiriw.
Nsɛm a wɔde kyerɛw nsɛm
Sesa nsɛm a wɔahyehyɛ no pɛpɛɛpɛ, dannan, ɔkwan a wɔfa so yɛ ade, emu duru, ne kɔla denam yɛn nkyerɛwee mfaso ne kɔla mfaso horow so .
Nsɛmfua a wɔatwa no tiaa
Stylized implementation of HTML's <abbr>
element ma abbreviations ne acronyms de kyerɛ nkyerɛase a wɔatrɛw mu no wɔ hover so. Abbreviations wɔ default underline na wonya mmoa cursor de ma nsɛm foforo wɔ hover ne wɔn a wɔde mmoa mfiridwuma di dwuma.
Fa ka .initialism
asɛmfua tiawa bi ho ma font-size a ɛyɛ ketewaa bi.
attr
HTML a wɔde di dwuma
Nsɛm a wɔde siw ano
Sɛ wopɛ sɛ wofa nsɛm a wɔabɔ no mua a efi baabi foforo a ɛwɔ wo krataa no mu a. Fa HTML<blockquote class="blockquote">
biara kyekyere ho sɛ nea wɔafa aka no.
Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.
Fibea bi din a wɔbɛbɔ
Fa a <footer class="blockquote-footer">
ma wohu baabi a wonya fi no ka ho. Fa fibea adwuma no din kyekyere <cite>
.
Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.
Nneɛma a Wɔde Di Dwuma
Fa text utilities di dwuma sɛnea ɛho hia na sesa alignment a ɛwɔ wo blockquote no mu.
Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.
Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.
Nsɛm a wɔahyehyɛ
Wɔannwene no
Yi default list-style
ne benkum margin wɔ list nneɛma (mmofra ntɛm ara nkutoo). Eyi fa mmofra a wɔakyerɛw wɔn din ntɛm ara nneɛma nkutoo ho , a ɛkyerɛ sɛ ɛho behia sɛ wode adesuakuw no ka ho ma nkyerɛwde biara a wɔde ahyɛ mu nso.
- Lorem ipsum dolor tena ase amet
- Consectetur adipiscing a ɛyɛ fɛ yiye
- Integer molestie lorem wɔ massa no mu
- Facilisis a ɛwɔ pretium nisl aliquet mu
- Nulla volutpat a ɛyɛ aduru a wɔde yɛ aduru
- Phasellus iaculis a ɛwɔ nipadua no mu
- Purus sodales a ɛyɛ aduru a ɛma obi ho yɛ hyew
- Vestibulum laoreet hyɛn gyinabea sem
- Ac tristique libero a ɔyɛ ɔbarima a ɔpɛ sɛ ɔyɛ biribiara
- Faucibus porta lacus a ɛyɛ fɛ a ɛyɛ fɛ
- Aenean tena ase amet erat nunc
- Eget porttitor a ɔyɛ ɔkyerɛkyerɛfo
Inline no mu
Yi list bi mu atuo no na fa kanea bi gu so margin
denam adesuakuw abien a wɔaka abom so, .list-inline
ne .list-inline-item
.
- Lorem ipsum a ɔyɛ ɔbarima
- Phasellus a wɔfrɛ no iaculis a wɔfrɛ no iaculis
- Nulla a ɔyɛ ɔkwasea
Nkyerɛkyerɛmu list alignment
Fa nsɛmfua ne nkyerɛkyerɛmu ahorow no hyia wɔ ɔkwan a ɛkɔ soro so denam yɛn grid nhyehyɛe no adesua ahorow a wɔadi kan akyerɛkyerɛ mu (anaasɛ nkyerɛase mixins) a wode bedi dwuma no so. Sɛ wopɛ nsɛm tenten a, wubetumi de .text-truncate
adesuakuw bi aka ho a wode ellipsis atwa nkyerɛwee no mu.
- Nkyerɛkyerɛmu a wɔahyehyɛ
- Nkyerɛkyerɛmu a wɔahyehyɛ no yɛ pɛpɛɛpɛ ma nsɛmfua nkyerɛase.
- Euismod ho asɛm
-
Vestibulum id ligula porta felis euismod awotwaa mu nsuo a ɛwɔ akyi berɛmo mu.
Donec id elit a ɛnyɛ mi porta gravida wɔ eget metus.
- Malesuada a ɛwɔ porta
- Etiam porta sem ɔbarima a ɔyɛ ɔbarima a ɔyɛ ɔbarima.
- Wɔatwa asɛmfua a wɔatwa no tiaa no mu
- Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut aduru a wɔde yɛ aduru a ɛma ɛyɛ mmerɛw sɛ wobɛtra ase amet risus.
- Nesting a wɔde yɛ buw
-
- Nested nkyerɛase list
- Aenean posuere, tortor sed nnome feugiat, ɔbea a ɔyɛ ɔbea a ɔyɛ ɔbea a ɔyɛ ɔbea a ɔyɛ ɔbea a ɔyɛ ɔbea a ɔyɛ ɔbea.
Font akɛse a ɛyɛ mmuae
Bootstrap v4.3 de po so hyɛn a ɛwɔ hokwan sɛ ɛbɛma font akɛse a ɛyɛ mmuae no ayɛ adwuma, a ɛma nsɛm no tumi susuw adebɔ mu kɛse wɔ mfiri ne viewport akɛse mu. Wobetumi ama RFS ayɛ adwuma denam $enable-responsive-font-sizes
Sass variable no a wobɛsesa akɔ true
ne Bootstrap a wobɛsan aboaboa ano no so.
Sɛ yɛbɛboa RFS a, yɛde Sass mixin di dwuma de si yɛn font-size
agyapadeɛ a ɛyɛ daa no ananmu. Wɔbɛboaboa font akɛseɛ a ɛyɛ mmuaeɛ ano ayɛ no calc()
dwumadie a ɛwɔ afrafra rem
ne viewport units na ama mmuaeɛ scaling suban no atumi ayɛ adwuma. Wobetumi ahu RFS ne ne nhyehyeɛ ho nsɛm pii wɔ ne GitHub adekorabea .