Fa'ase'e ile anotusi autu Fa'ase'e ile su'ega fa'amatalaga
in English

Toe fai

Toe fa'afou, o se fa'aputuga o suiga CSS fa'apitoa i elemene i se faila e tasi, kickstart Bootstrap e tu'uina atu ai se laina fa'alelei, tumau, ma faigofie e fausia i luga.

Auala

Toe fa'afou i luga ole Normalize, tu'uina atu le tele o elemene HTML fa'atasi ai ma sitaili manatu fa'aaoga na'o elemene filifilia. Fa'aopoopo sitaili e faia na'o vasega. Mo se faʻataʻitaʻiga, matou te toe faʻafou nisi <table>sitaili mo se laina faʻavae faigofie ma mulimuli ane tuʻuina atu .table, .table-bordered, ma isi mea.

O a matou taʻiala ma mafuaʻaga mo le filifilia o mea e faʻamalo ile Toe Faʻafouina:

  • Fa'afou nisi o mea tau su'esu'e fa'aletonu e fa'aoga ai remle s nai lo le ems mo le fa'aogaina o le va o vaega.
  • Aloese mai margin-top. E mafai ona pa'u i lalo pito tu'usa'o, ma maua ai i'uga e le'i fa'amoemoeina. Ae sili atu ona taua, o le tasi itu o marginse faʻataʻitaʻiga faigofie o le mafaufau.
  • Mo le fa'afaigofieina ole fa'asili ile tele ole masini, e tatau ona fa'aoga elemene poloka rems mo marginle s.
  • Fa'atumauina fa'aitiitiga fa'amatalaga o fontmeatotino e feso'ota'i, fa'aaoga inheriti so'o se taimi e mafai ai.

Itulau fa'aletonu

O le <html>ma <body>elemene ua fa'afouina ina ia maua ai le fa'aletonu o itulau-lautele. Aemaise lava:

  • O box-sizinglo'o fa'atulagaina i le lalolagi atoa i elemene uma—e aofia ai *::beforema le *::after, i le border-box. Ole mea lea e fa'amautinoa ai e le sili atu le lautele o le elemene ona o le padding po'o le tuaoi.
    • E leai se fa'avae font-sizee fa'ailoa i luga ole <html>, ae 16pxfa'apea (le browser default). font-size: 1remo lo'o fa'aogaina i luga ole <body>laiga mo le fa'afaigofieina ole fa'avasegaina o ituaiga e ala i fa'asalalauga fa'asalalauga a'o fa'aaloalo i mana'oga o tagata fa'aoga ma fa'amautinoaina se auala e sili atu ona faigofie. E mafai ona suitulaga lenei masini su'esu'e e ala i le suia o le $font-size-rootfesuiaiga.
  • O <body>lo'o fa'atulagaina fo'i se lalolagi font-family, font-weight, line-height, ma color. O lenei mea e tu'ufa'atasia mulimuli ane e nisi o elemene foliga e puipuia ai le le tutusa o vaitusi.
  • Mo le saogalemu, o <body>lo'o i ai se fa'aaliga background-color, fa'aletonu i #fff.

Fa'aputu fa'aputu

E fa'aogaina e Bootstrap se "fa'aputu vaitusi masani" po'o le "fa'aputu fa'apolokalame fa'apipi'i" mo le fa'aliliuina lelei o tusitusiga i masini uma ma OS. O nei fonuka faiga ua mamanuina faapitoa ma masini o aso nei i le mafaufau, faatasi ai ma le faʻaleleia atili o le faʻaliliuga i luga o lau, lagolago fesuiaiga o vai, ma isi mea. Faitau atili e uiga i fa'aputuga vainu'u masani i totonu o lenei Smashing Magazine article .

$font-family-sans-serif:
  // Cross-platform generic font family (default user interface font)
  system-ui,
  // Safari for macOS and iOS (San Francisco)
  -apple-system,
  // Windows
  "Segoe UI",
  // Android
  Roboto,
  // Basic web fallback
  "Helvetica Neue", Arial,
  // Linux
  "Noto Sans",
  "Liberation Sans",
  // Sans serif fallback
  sans-serif,
  // Emoji fonts
  "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;

Manatua talu ai ona o le fa'aputu fa'aputu e aofia ai emoji fonuka, o le tele o fa'ailoga masani/dingbat unicode mataitusi o le a fa'aliliuina o ni ata felanulanua'i. O latou foliga o le a eseese, faʻatatau i le sitaili o loʻo faʻaogaina i le browser/platform's native emoji font, ma e le afaina i latou i soʻo se colorsitaili CSS.

E font-familyfa'aoga lea i le <body>ma otometi ona fa'atosina i le lalolagi atoa i Bootstrap. Ina ia fesuiai le lalolagi font-family, faʻafouina $font-family-basema toe faʻapipiʻi Bootstrap.

Ulutala ma parakalafa

O elemene ulutala uma—faataitaiga, <h1>—ma <p>ua toe setiina ina ia margin-topaveese. Ua margin-bottom: .5remfaaopoopo ulutala ma parakalafa margin-bottom: 1remmo le faafaigofieina o avanoa.

Ulutala Faataitaiga
<h1></h1> h1. Ulutala Bootstrap
<h2></h2> h2. Ulutala Bootstrap
<h3></h3> h3. Ulutala Bootstrap
<h4></h4> h4. Ulutala Bootstrap
<h5></h5> h5. Ulutala Bootstrap
<h6></h6> h6. Ulutala Bootstrap

Lisi

O lisi uma— <ul>, <ol>, ma <dl>margin-topia aveese ma a margin-bottom: 1rem. O lisi fa'aputu e leai margin-bottom. Ua matou toe setiina foi le padding-lefton <ul>ma <ol>elemene.

  • O lisi uma ua aveese o latou pito pito i luga
  • Ma o latou pito pito i lalo ua fa'asalaina
  • O lisi fa'aputu e leai se pito i lalo
    • O le auala lea e sili atu ona foliga tutusa
    • Aemaise lava pe a soso'o ma isi mea lisi
  • O le padding agavale ua toe setiina foi
  1. O se lisi fa'atonu
  2. Faatasi ai ma ni nai mea lisi
  3. E tutusa uma foliga
  4. E pei o le lisi muamua e le fa'atonuina

Mo sitaili faigofie, manino fa'atonuga, ma sili atu avanoa, lisi fa'amatalaga ua fa'afouina margins. <dd>s toe seti margin-lefti 0ma faaopoopo margin-bottom: .5rem. <dt>s ua fa'amalosi .

Lisi fa'amatalaga
Ole lisi fa'amatalaga e lelei atoatoa mo le fa'amalamalamaina o upu.
Vaitaimi
Uiga mo le upu.
O se faauigaga lona lua mo le faaupuga lava e tasi.
O le isi faaupuga
Fa'amatalaga mo lenei isi faaupuga.

Fa'ailoga laina

Afifi fasi laina fa'ailoga fa'ailoga ma <code>. Ia mautinoa e sola ese mai puipui tulimanu HTML.

Mo se faʻataʻitaʻiga, <section>e tatau ona afifi i totonu.
For example, <code>&lt;section&gt;</code> should be wrapped as inline.

Fa'ailoga poloka

Fa'aoga <pre>le s mo le tele o laina fa'ailoga. Toe fo'i, ia mautinoa e sola ese mai so'o se fa'amaufa'ailoga fa'ailoga i le fa'ailoga mo le fa'aliliuga tatau. Ua <pre>toe setiina le elemene e aveese ona margin-topma faaaoga remiunite mo lona margin-bottom.

<p>Sample text here...</p>
<p>And another line of sample text here...</p>
<pre><code>&lt;p&gt;Sample text here...&lt;/p&gt;
&lt;p&gt;And another line of sample text here...&lt;/p&gt;
</code></pre>

Fuafuaga

Mo le faʻaalia o fesuiaiga faʻaaoga le <var>tag.

y = m x + b
<var>y</var> = <var>m</var><var>x</var> + <var>b</var>

Fa'aoga tagata

Fa'aoga le <kbd>fa'ailoga e fa'ailoa ai mea e masani ona fa'aulu ile piano.

Ina ia fesuia'i fa'atonuga, ta'i cdsoso'o ma le igoa o le fa'atonuga.
Ina ia teuteu tulaga, fetaomi ctrl + ,
To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>

Fa'ata'ita'iga galuega

Mo le fa'ailoaina o fa'ata'ita'iga fa'atino mai se polokalame fa'aaoga le <samp>tag.

O lenei tusitusiga o lo'o fa'atatau e fa'atatauina o se fa'ata'ita'iga o mea na maua mai se polokalame komepiuta.
<samp>This text is meant to be treated as sample output from a computer program.</samp>

Laupapa

E fetuutuunai teisi laulau i sitaili <caption>s, pa'u i lalo tuaoi, ma fa'amautinoa e tumau i le text-aligntaimi atoa. Suiga faaopoopo mo tuaoi, padding, ma isi mea e sau faatasi ma le .tablevasega .

O se fa'ata'ita'iga laulau lea, ma o lona fa'amatalaga lea e fa'amatala ai mea o lo'o i totonu.
Ulutala laulau Ulutala laulau Ulutala laulau Ulutala laulau
Laulau laulau Laulau laulau Laulau laulau Laulau laulau
Laulau laulau Laulau laulau Laulau laulau Laulau laulau
Laulau laulau Laulau laulau Laulau laulau Laulau laulau

Fomu

O elemene fomu eseese ua toe fa'afouina mo sitaili fa'avae faigofie. O nisi nei o suiga iloga:

  • <fieldset>s e leai ni tuaoi, padding, poʻo se pito e faigofie ona faʻaaogaina e fai ma afifi mo mea faʻaoga taʻitasi poʻo vaega o mea faʻaoga.
  • <legend>s, pei o fieldsets, ua toe fa'afo'i fo'i ina ia fa'aalia o se ulutala o ituaiga.
  • <label>s ua seti e display: inline-blockfa'ataga margine fa'aoga.
  • <input>s, <select>s, <textarea>s, ma <button>s e tele lava ina tautalagia e Normalize, ae Toe aveese latou marginma seti line-height: inherit, foi.
  • <textarea>s ua suia ina ia na'o le mafai ona sui i luga i luga o le sa'o e pei o le fa'alava fa'alava e masani ona "ta'atia" le fa'atulagaina o itulau.
  • <button>s ma <input>elemene faamau e iai le cursor: pointertaimi :not(:disabled).

O nei suiga, ma isi mea, o loʻo faʻaalia i lalo.

Faataitaiga talatuu

100

Aso & lanu lagolago i totonu

Ia manatua e le'o atoatoa ona lagolagoina e tagata su'esu'e uma mea e tu'uina atu i aso, o Safari.

Fa'ailoga i fa'amau

Toe fa'afou e aofia ai se fa'aleleia atili mo role="button"le suia o le fa'ailoga fa'aletonu i le pointer. Fa'aopoopo lenei uiga i elemene e fesoasoani e fa'ailoa ai elemene o lo'o fegalegaleai. O lenei matafaioi e le mana'omia mo <button>elemene, e maua a latou lava cursorsuiga.

Fa'amau elemene e leai se fa'amau
<span role="button" tabindex="0">Non-button element button</span>

Elemene eseese

tuatusi

Ua <address>toe faafou le elemene e toe setiina ai le faaletonu ole browser font-stylemai italicile normal. line-height‘ua fai fo‘i ma tofi, ma margin-bottom: 1rem‘ua fa‘aopoopoina. <address>s e mo le tu'uina atu o fa'amatalaga fa'afeso'ota'i mo tuaa lata ane (po'o se galuega atoa). Fa'asao le fa'atulagaina e ala i le fa'au'uina o laina i le <br>.

Twitter, Inc.
1355 Market St, Suite 900
San Francisco, CA 94103
P: (123) 456-7890
Igoa Atoa
[email protected]

Blockquote

Ole faaletonu marginile poloka upusii ole 1em 40px, o lea matou te toe setiina lena 0 0 1remmea mo se mea e sili atu ona ogatasi ma isi elemene.

O se upusii ta'uta'ua, o lo'o i totonu o se elemene poloka upusii.

O se tasi lauiloa i le Source Title

Elemene i totonu

O le <abbr>elemene e maua le sitaili masani e fa'aalia ai i totonu o tusitusiga parakalafa.

Nulla attr vitae elit libero, a pharetra augue.

Aotelega

O le faaletonu cursori luga o le aotelega o le text, o lea matou te toe setiina ai pointere faʻaalia ai e mafai ona fegalegaleai le elemene e ala i le kiliki i luga.

O nisi fa'amatalaga

Fa'amatalaga atili e uiga i fa'amatalaga.

E sili atu faʻamatalaga

O nisi nei fa'amatalaga e uiga i fa'amatalaga.

HTML5 [hidden]uiga

E fa'aopoopo e le HTML5 se uiga fou o le lalolagi ua ta'ua[hidden] , lea e fa'aigoaina display: nonee le mafai. Nono mai se manatu mai le PureCSS , matou te fa'alelei i luga o lenei fa'aletonu e ala i le faia [hidden] { display: none !important; }e fesoasoani e puipuia ai displaymai le fa'afuase'i ona soloia.

<input type="text" hidden>
jQuery le fetaui

[hidden]e le fetaui ma jQuery $(...).hide()ma $(...).show()metotia. O le mea lea, matou te le o faʻamaonia faapitoa [hidden]i le taimi nei isi metotia mo le puleaina displayo elemene.

Ina ia na'o le fesuia'iina o le va'aia o se elemene, o lona uiga displaye le o suia ma o le elemene e mafai lava ona a'afia ai le tafe o le pepa, fa'aoga le .invisiblevasega .