Source

Reboot no bio

Reboot, element-specific CSS nsakraeɛ a wɔaboaboa ano wɔ fael baako mu, kickstart Bootstrap ma ɛma mfitiaseɛ a ɛyɛ fɛ, ɛkɔ so daa, na ɛnyɛ den a wobɛsi so.

Kwan

Reboot gyina Normalize so, ɛma HTML elements pii a ɛwɔ adwene bi a ɛwɔ adwene a wɔde element selectors nkutoo di dwuma. Wɔde adesua ahorow nkutoo na ɛyɛ styling foforo. Sɛ nhwɛso no, yɛsan bɔ <table>style ahorow bi ma baseline a ɛyɛ mmerɛw na akyiri yi yɛde .table, .table-bordered, ne nea ɛkeka ho ma.

Yɛn akwankyerɛ ne ntease ahorow a enti ɛsɛ sɛ wopaw nea ɛsɛ sɛ wobɔ so wɔ Reboot mu ni:

  • Yɛ browser default values ​​binom foforo na fa rems di dwuma sen sɛ wode s bedi dwuma emama scalable component spacing.
  • Kwati sɛ margin-top. Nneɛma a ɛwɔ nkyɛnkyɛn a ɛda hɔ gyina hɔ no betumi abubu, na ɛde nneɛma a wɔnhwɛ kwan aba. Nanso nea ɛho hia kɛse no, akwankyerɛ biako a wɔde ma marginne adwene mu nhwɛso a ɛyɛ mmerɛw.
  • Sɛnea ɛbɛyɛ a ɛbɛyɛ mmerɛw sɛ wobɛma scaling wɔ device sizes nyinaa mu no, ɛsɛ sɛ block elements de s di dwuma remma margins.
  • Ma mpaemuka ahorow a fontɛfa -a ɛfa agyapade ho no nyɛ nea ɛba fam koraa, fa di dwuma inheritbere biara a ɛbɛyɛ yiye.

Kratafa no yɛ nea wɔahyɛ da ayɛ

Wɔayɛ <html>ne <body>elements no foforo de ama kratafa no nyinaa defaults a eye. Nea ɛkɔ akyiri yi:

  • Wɔde box-sizingwiase nyinaa asi element biara so—a *::beforene , ka ho *::after, kosi border-box. Eyi hwɛ hu sɛ wɔrentra element no trɛw a wɔabɔ ho dawuru no da esiane padding anaa border nti.
    • Wɔmmɔ nnyinaso font-sizebiara ho dawuru wɔ <html>, nanso 16pxwɔfa no sɛ (browsa no default). font-size: 1remwɔde di dwuma wɔ the <body>for easy responsive type-scaling via media queries bere a wɔkyerɛ obu ma nea ɔde di dwuma no apɛde na ɛhwɛ hu sɛ wɔfa ɔkwan a ɛyɛ mmerɛw so.
  • The <body>nso de wiase nyinaa font-family, line-height, ne text-align. Eyi fi awo mu akyiri yi denam form elements binom so de siw font a enhyia ano.
  • Sɛnea ɛbɛyɛ a ahobammɔ bɛba no, the <body>has a background-colordeclared , defaulting to #fff.

Native font a wɔde ahyɛ mu

Wɔagyae wɛb nkyerɛwde a wɔde ahyɛ hɔ (Helvetica Neue, Helvetica, ne Arial) wɔ Bootstrap 4 mu na wɔde “native font stack” asi ananmu ama nsɛm a wɔbɛkyerɛ ase yiye wɔ mfiri ne OS biara so. Kenkan native font stacks ho nsɛm pii wɔ Smashing Magazine asɛm yi mu .

$font-family-sans-serif:
  // Safari for OS X and iOS (San Francisco)
  -apple-system,
  // Chrome < 56 for OS X (San Francisco)
  BlinkMacSystemFont,
  // Windows
  "Segoe UI",
  // Android
  "Roboto",
  // Basic web fallback
  "Helvetica Neue", Arial, sans-serif,
  // Emoji fonts
  "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;

Eyi font-familyyɛ nea wɔde di dwuma wɔ <body>ne automatically inherited wiase nyinaa wɔ Bootstrap nyinaa mu. Sɛ wopɛ sɛ wosakra global font-family, update $font-family-basena san boaboa Bootstrap ano.

Nsɛmti ne nkyekyɛm ahorow

Asɛmti no mu nneɛma nyinaa—sɛ nhwɛso no, <h1>—na <p>wɔsan de si hɔ sɛnea ɛbɛyɛ a wobeyi wɔn margin-topafi hɔ. Wɔde nsɛmti ahorow margin-bottom: .5remaka ho ne nkyekyem margin-bottom: 1remahorow a ɛbɛma ntam kwan ayɛ mmerɛw.

Asɛmti Nhwɛsoɔ

<h1></h1>

h1. Bootstrap asɛmti no

<h2></h2>

h2. Bootstrap asɛmti no

<h3></h3>

h3. Bootstrap asɛmti no

<h4></h4>

h4. Bootstrap asɛmti no

<h5></h5>

h5. Bootstrap asɛmti no

<h6></h6>

h6. Bootstrap asɛmti no

Nsɛm a wɔahyehyɛ

Lists nyinaa— <ul>, <ol>, ne <dl>—wɔ wɔn a margin-topwɔayi afi hɔ ne a margin-bottom: 1rem. Nested list ahorow no nni margin-bottom.

  • 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
  1. Lorem ipsum dolor tena ase amet
  2. Consectetur adipiscing a ɛyɛ fɛ yiye
  3. Integer molestie lorem wɔ massa no mu
  4. Facilisis a ɛwɔ pretium nisl aliquet mu
  5. Nulla volutpat a ɛyɛ aduru a wɔde yɛ aduru
  6. Faucibus porta lacus a ɛyɛ fɛ a ɛyɛ fɛ
  7. Aenean tena ase amet erat nunc
  8. Eget porttitor a ɔyɛ ɔkyerɛkyerɛfo

Sɛnea ɛbɛyɛ a wobɛhyehyɛ no mmerɛw, nhyehyɛe a emu da hɔ, ne ntam kwan a eye no, nkyerɛkyerɛmu list ahorow no ayɛ margins foforo. <dd>s reset margin-leftto 0na fa ka ho margin-bottom: .5rem. <dt>s no yɛ nkyerɛwde tuntum .

Nkyerɛkyerɛmu ahorow 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 semper a ɛyɛ mmerɛw sɛ wobɛbɔ wo bra no.
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.

Nsɛm a wɔadi kan ayɛ no format

Wɔsan <pre>de element no si hɔ de yi ne margin-topna wɔde remunits di dwuma ma ne margin-bottom.

.nhwɛsoɔ-adeɛ { .
  margin-ase: 1rem;
} .

Nnwinnade ahorow

Wɔayɛ pon ahorow no ho nhyehyɛe kakra ma ɛne style <caption>s, collapse borders, na wɔhwɛ hu sɛ ɛkɔ so daa wɔ ne text-alignnyinaa mu. Nsakrae foforo a ɛfa borders, padding, ne nea ɛkeka ho no ka .tableadesuakuw no ho .

Eyi yɛ nhwɛso pon, na eyi ne ne nsɛm a wɔakyerɛw a wɔde kyerɛkyerɛ emu nsɛm mu.
Table asɛmti Table asɛmti Table asɛmti Table asɛmti
Table cell Table cell Table cell Table cell
Table cell Table cell Table cell Table cell
Table cell Table cell Table cell Table cell

Nkyerɛwee ahorow

Wɔasan ahyɛ form elements ahorow ase ama base styles a ɛyɛ mmerɛw. Nsakrae a ɛda nsow sen biara no bi ni:

  • <fieldset>s nni borders, padding, anaa margin enti wobetumi de adi dwuma mmerɛw sɛ wrappers ama ankorankoro inputs anaa inputs akuw.
  • <legend>s, te sɛ fieldsets, nso wɔasan ayɛ no foforo sɛnea ɛbɛyɛ a wɔbɛda no adi sɛ asɛmti a ɛyɛ ahorow.
  • <label>s no wɔde asi hɔ sɛ display: inline-blockwɔbɛma kwan marginma wɔde adi dwuma.
  • <input>s, <select>s, <textarea>s, ne <button>s no, Normalize na ɛdi ho dwuma dodoɔ no ara, nanso Reboot yi wɔn marginne set line-height: inherit, nso.
  • <textarea>s no yɛ nsakrae ma ɛyɛ nea wotumi sesa ne kɛse vertically nkutoo sɛnea horizontal resizing taa “bubu” kratafa nhyehyɛe no.

Wɔada nsakrae ahorow yi, ne nea ɛkeka ho adi wɔ ase ha.

Nhwɛso anansesɛm

100 na ɛwɔ hɔ

Misc nneɛma ahorow

Adrɛse

Wɔayɛ <address>element no foforo de asan ahyɛ browser no default no font-styleafi italicnormal. line-heightno nso mprempren anya agyapade, na margin-bottom: 1remwɔde aka ho. <address>s yɛ nea wɔde bɛma nana a ɔbɛn no paa (anaasɛ adwuma mũ no nyinaa) nkitahodi ho nsɛm. Kora formatting so denam nkyerɛwde a wode bɛhyɛ awiei no so <br>.

1355
Market St, Suite 900
San Francisco, CA 94103 Kr
: (123)
Edin a edi mũ
[email protected]

Nsɛm a wɔde siw ano

Default margina ɛwɔ blockquotes so ne 1em 40px, enti yɛsan de saa to 0 0 1remhɔ ma biribi a ɛne nneɛma afoforo hyia kɛse.

Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.

Obi a wagye din wɔ Source Title mu

Nneɛma a ɛwɔ inline mu

Element <abbr>no nya mfitiase styling ma ɛda nsow wɔ nkyekyɛm nsɛm mu.

Nulla attr vitae elit libero, a ɛyɛ aduru a wɔde yɛ aduan.

Tɔfabɔ

Default cursorwɔ summary so ne text, enti yɛsan de saa to pointerno de kyerɛ sɛ wobetumi ne element no adi nkitaho denam klik a wobɛbɔ so.

Nsɛm bi a ɛkɔ akyiri

More info fa nsɛm no ho.

Nsɛm pii mpo

Nsɛm pii mpo a ɛfa nsɛm no ho ni.

HTML5 [hidden]su a ɛwɔ hɔ

HTML5 de wiase nyinaa su foforo a wɔato din[hidden] , a wɔayɛ no sɛnea display: noneɛte no ka ho. Borrowing an idea from PureCSS , yɛtu mpɔn wɔ saa default yi so denam yɛ a yɛbɛyɛ [hidden] { display: none !important; }de aboa ma wɔasiw ne displaykwan sɛ ɛbɛba so wɔ akwanhyia mu no so. Bere [hidden]a ɛnyɛ natively supported by IE10, pefee mpaemuka wɔ yɛn CSS no di saa ɔhaw no ho dwuma.

<input type="text" hidden>
jQuery a ɛne ne ho nhyia

[hidden]no ne jQuery's $(...).hide()ne $(...).show()akwan horow no nhyia. Enti, mprempren yɛnyɛ titiriw endorse [hidden]over akwan afoforo a wɔfa so di displayof elements no ho dwuma.

Sɛ wopɛ sɛ wodannan element bi a wotumi hu no ara kwa, a ɛkyerɛ displaysɛ wɔansakra ne na element no da so ara tumi nya krataa no nsu a ɛsen no so nkɛntɛnso a, fa adesuakuw no.invisible di dwuma mmom.