Skip to main content Skip ad navigationem soUicitudo
Check
in English

Eget ratio

Nostris potentis mobilibus-primo flexali eget utere ad rationes omnium formarum et magnitudinum ad fabricandas rationes duodecim columnae systematis, sex gradibus responsuris defectus, variabilium Sass et mixinorum, ac justos classium praedefinitorum.

Exemplum

Bootstrap ratio eget systematis utitur serie continentium, versuum et columnarum ad layout et align contentorum. Cum flexbox constructum est et plene responsivum est. Infra exemplum et explicatio altissimae quomodo euismod ratio coit.

Novi vel flexbox insuetis? Lege hunc CSS Tricks flexboxs guide for background, terminologia, guidelines and code excerpta.
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row">
    <div class="col">
      Column
    </div>
    <div class="col">
      Column
    </div>
    <div class="col">
      Column
    </div>
  </div>
</div>

Exemplum superius tres columnas aequales latas per omnes machinas et prospectus efficit utentes classes eget praedefinitis nostris. Columnae istae in pagina cum parente centae sunt .container.

Quomodo facitur

Frangendo, hic quomodo ratio electronica coit;

  • Nostra malesuada euismod sex fracturae responsivas sustinet . Naufragia in quaestionibus min-widthinstrumentis nituntur, significationem illam confractionem et omnia quae supra (ex. gr. .col-sm-4ad sm, md, lg, xlet pertinent xxl) afficiunt. Hoc modo regere potes continentem et columnam magnitudines et mores ab unaquaque parte breakpoint.

  • Vasa centrum et transversae codex contentus tua est. Utere .containerad pixelam responsivam latitudinem, .container-fluidper width: 100%omnes prospectus et machinas, vel receptaculum responsivum (exempli gratia .container-md) pro latitudinibus fluidis et pixel complexione.

  • Ordines columnarum involucri sunt. Quaelibet columna horizontalem padding(quae stillicidium vocant) ad spatium inter se moderandum habet. Hoc paddingergo in ordinibus cum marginibus negativis contrariatur ut contentum in tuis columnis uisum parti sinistrae perpendat. Ordines etiam adiuvant determinatas classes ad uniformiter applicandas columnas inspectiones et triviales classes ad mutandum contentus tui spatium.

  • Columnae incredibiliter flexibiles sunt. There are 12 templates columns available per row, sino vos varias coniunctiones elementorum quae quolibet numero columnarum spatiantur. Columnae classes indicant numerum columnarum templates ad palmos (eg, col-4palmos quattuor). widths in percentages sic semper habes eandem inspectionem relativam.

  • Canales sunt etiam dociles et customizable. Gutter classes are available across all breakpoints, with all the same sizes as our margin and padding spacing . Mutare canales horizontales cum .gx-*classibus, canales verticales .gy-*, vel omnes canales cum .g-*classibus. .g-0praesto est etiam ad canales removendas.

  • Sass variables, maps, and mixins power in malesuada euismod. Si non vis praefinitis eget classibus in Bootstrap uti, potes uti fonte Sass nostro egetis ad creandum proprium tuum plus semanticae notae. Includimus etiam quasdam proprietates CSS consuetudinis ut has Sass variabiles consumat ad maiorem tibi flexibilitatem.

Animadverte limitationes et cimices circa flexboxs , sicut non posse uti aliqua HTML elementa sicut vascula flexiva .

Eget optiones

Bootstrap ratio elaborationis aptare potest per omnes sex fracturae defectus accommodare, et quaslibet punctiones quas tu customize. Sex gradibus defaltae euismod sunt hae:

  • Extra parva (xs)
  • Parvus (sm)
  • Medium (md)
  • Magna (lg)
  • Extra magnum (xl).
  • Extra magnum (xxl)

Ut supra dictum est, unumquodque horum fracturae proprium vas, singulare genus praepositionem et determinativam habent. Ecce quomodo malesuada euismod transversas istas breakpoints mutat:

xs
<576px
sm
≥576px
md
≥768px
lg
≥992px
xl
≥1200px
xxl
≥1400px
Continensmax-width Nemo (auto) 540px 720px 960px 1140px 1320px
Classis praepositionis .col- .col-sm- .col-md- .col-lg- .col-xl- .col-xxl-
# Columnarum 12
Tetigisset domatum fistulas latitudo 1.5rem (.75rem in dextra)
Mos tetigisset domatum fistulas Ita
Nestable Ita
Columna ordinatio Ita

Auto-layout columnas

Utere ad breakpoint-specificae columnae classes ad faciliorem columnam inspectionem sine classe explicata numero similia .col-sm-6.

aequalis latitudo

Exempli gratia, hic duo proposita eget arcu quae ad omnem fabricam et conspectum pertinent, ab xsad xxl. Adde quotlibet unitates-minores classes pro singulis ruptionibus quibus indigetis et cuiuslibet columnae latitudo eadem erit.

1 of 2
2 of 2
1 of 3
2 of 3
3 of 3
html
<div class="container text-center">
  <div class="row">
    <div class="col">
      1 of 2
    </div>
    <div class="col">
      2 of 2
    </div>
  </div>
  <div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col">
      2 of 3
    </div>
    <div class="col">
      3 of 3
    </div>
  </div>
</div>

Profecta columna una latitudo

Auto-layout pro flexbox columnis eget etiam significat latitudinem unius columnae constituere potes et circa eam sponte resize columnas germanas habere. Potes uti eget classibus praedefinitis (ut infra ostendetur), eget mixins, vel inversae lineae. Nota quod alie columnae resizent nullam rem latitudinem centri columnae.

1 of 3
2 cf.
3 of 3
1 of 3
2 cf.
3 of 3
html
<div class="container text-center">
  <div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col-6">
      2 of 3 (wider)
    </div>
    <div class="col">
      3 of 3
    </div>
  </div>
  <div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col-5">
      2 of 3 (wider)
    </div>
    <div class="col">
      3 of 3
    </div>
  </div>
</div>

Variabilis latitudo content

Classes uti col-{breakpoint}-autoad magnitudinem columnarum secundum naturalem latitudinem contenti sunt.

1 of 3
Variabilis latitudo content
3 of 3
1 of 3
Variabilis latitudo content
3 of 3
html
<div class="container text-center">
  <div class="row justify-content-md-center">
    <div class="col col-lg-2">
      1 of 3
    </div>
    <div class="col-md-auto">
      Variable width content
    </div>
    <div class="col col-lg-2">
      3 of 3
    </div>
  </div>
  <div class="row">
    <div class="col">
      1 of 3
    </div>
    <div class="col-md-auto">
      Variable width content
    </div>
    <div class="col col-lg-2">
      3 of 3
    </div>
  </div>
</div>

Responsivum classes

Eget eget Bootstrap sex ordines praedefinitorum classes comprehendit ut elaborandis propositionibus responsivis implicatis. Magnitudinem columnarum tuorum extra parvas, parvas, medias, magnas, vel extra magnas machinas quamlibet aptas exerce.

Omnes breakpoints

Nam grides ipsae a minimis ad maximas cogitationes, uti .colet .col-*classes. Specificare genus numeratum cum columna singulari opus est; aliter, libenter adhaerere .col.

col
col
col
col
col-8
col-4
html
<div class="container text-center">
  <div class="row">
    <div class="col">col</div>
    <div class="col">col</div>
    <div class="col">col</div>
    <div class="col">col</div>
  </div>
  <div class="row">
    <div class="col-8">col-8</div>
    <div class="col-4">col-4</div>
  </div>
</div>

Reclinant ad horizontem

Uno ordine .col-sm-*classium utendo, rationem egetis fundamentalem creare potes, quae reclinata incipit et horizontalis in parvo puncto efficitur ( sm).

col-sm-8
col-sm-4
col-sm
col-sm
col-sm
html
<div class="container text-center">
  <div class="row">
    <div class="col-sm-8">col-sm-8</div>
    <div class="col-sm-4">col-sm-4</div>
  </div>
  <div class="row">
    <div class="col-sm">col-sm</div>
    <div class="col-sm">col-sm</div>
    <div class="col-sm">col-sm</div>
  </div>
</div>

Misce et aequare

Non vis tuas columnas ad solum ACERVUS in quibusdam gradibus euismod? Utere compositione diversorum generum pro unoquoque ordine prout opus est. Vide infra exemplum melioris notionis quomodo omnia operatur.

.col-md-8
.col-6 .col-md-4
.col-6 .col-md-4
.col-6 .col-md-4
.col-6 .col-md-4
.col-6
.col-6
html
<div class="container text-center">
  <!-- Stack the columns on mobile by making one full-width and the other half-width -->
  <div class="row">
    <div class="col-md-8">.col-md-8</div>
    <div class="col-6 col-md-4">.col-6 .col-md-4</div>
  </div>

  <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
  <div class="row">
    <div class="col-6 col-md-4">.col-6 .col-md-4</div>
    <div class="col-6 col-md-4">.col-6 .col-md-4</div>
    <div class="col-6 col-md-4">.col-6 .col-md-4</div>
  </div>

  <!-- Columns are always 50% wide, on mobile and desktop -->
  <div class="row">
    <div class="col-6">.col-6</div>
    <div class="col-6">.col-6</div>
  </div>
</div>

Row columnas

Classibus responsivis utere, .row-cols-*ut cito numerum columnarum constituas, quae optimam mentem tuam et intentionem tuam reddas. .col-*Cum in singulis columnis (exempli gratia ) normales classes applicentur .col-md-4, columnarum ordines in parente .rowbreves sunt. Cum .row-cols-autocolumnarum latitudinem naturalem eorum dare potes.

His columnis ordinis utere classes, ut cito emissiones praecipuas eget creandi vel ad sistendas cardines coercendas.

Columna
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row row-cols-2">
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
  </div>
</div>
Columna
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row row-cols-3">
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
  </div>
</div>
Columna
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row row-cols-auto">
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
  </div>
</div>
Columna
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row row-cols-4">
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
  </div>
</div>
Columna
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row row-cols-4">
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col-6">Column</div>
    <div class="col">Column</div>
  </div>
</div>
Columna
Columna
Columna
Columna
html
<div class="container text-center">
  <div class="row row-cols-1 row-cols-sm-2 row-cols-md-4">
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
    <div class="col">Column</div>
  </div>
</div>

Potes uti comite Sass mixin, row-cols():

.element {
  // Three columns to start
  @include row-cols(3);

  // Five columns from medium breakpoint up
  @include media-breakpoint-up(md) {
    @include row-cols(5);
  }
}

Nidificans

Ut contentus egeo defalta edificare te, novas .rowac columnas intra columnam .col-sm-*existentem appone. .col-sm-*Ordines nestedi includere columnarum copia quae usque ad 12 vel pauciores adde (non requiritur ut omnibus 12 columnis in promptu uteris).

Level 1: .col-sm-3
Level 2: .col-8 .col-sm-6
Level 2: .col-4 .col-sm-6
html
<div class="container text-center">
  <div class="row">
    <div class="col-sm-3">
      Level 1: .col-sm-3
    </div>
    <div class="col-sm-9">
      <div class="row">
        <div class="col-8 col-sm-6">
          Level 2: .col-8 .col-sm-6
        </div>
        <div class="col-4 col-sm-6">
          Level 2: .col-4 .col-sm-6
        </div>
      </div>
    </div>
  </div>
</div>

Sass

Cum per Bootstrap fontem Sass lima, optionem habes utendi Sass variabilium et mixins ut consuetudo, semantica, et responsiva paginae layout. Classes nostrae praedefinitae eget in eisdem differentiis et mixinis utantur ut integram classem paratarum ad usum generum praebeant ad propositum responsurum celeriter.

Variabilium

Variabiles et mappae numerum columnarum, triviis latitudinem determinant, et punctum instrumentorum quaesitum, quo in columnas volitare incipiant. His utimur ad generandum praedefinitas eget classes supra confirmatas, necnon pro consuetudine mixins infra recensita.

$grid-columns:      12;
$grid-gutter-width: 1.5rem;
$grid-row-columns:  6;
$grid-breakpoints: (
  xs: 0,
  sm: 576px,
  md: 768px,
  lg: 992px,
  xl: 1200px,
  xxl: 1400px
);
$container-max-widths: (
  sm: 540px,
  md: 720px,
  lg: 960px,
  xl: 1140px,
  xxl: 1320px
);

Mixins

Mixins in conjunctione cum variabilium eget ad generandum semanticam CSS pro singulis columnis eget.

// Creates a wrapper for a series of columns
@include make-row();

// Make the element grid-ready (applying everything but the width)
@include make-col-ready();

// Without optional size values, the mixin will create equal columns (similar to using .col)
@include make-col();
@include make-col($size, $columns: $grid-columns);

// Offset with margins
@include make-col-offset($size, $columns: $grid-columns);

Exemplum usus

Mutationes variabiles ad valorum suorum consuetudinum mutare potes, vel mixinis cum eorum defectu valoribus tantum utere. Exemplum est hic usus occasus defectus ad efficiendum duas columnas extensiones cum interstitio.

.example-container {
  @include make-container();
  // Make sure to define this width after the mixin to override
  // `width: 100%` generated by `make-container()`
  width: 800px;
}

.example-row {
  @include make-row();
}

.example-content-main {
  @include make-col-ready();

  @include media-breakpoint-up(sm) {
    @include make-col(6);
  }
  @include media-breakpoint-up(lg) {
    @include make-col(8);
  }
}

.example-content-secondary {
  @include make-col-ready();

  @include media-breakpoint-up(sm) {
    @include make-col(6);
  }
  @include media-breakpoint-up(lg) {
    @include make-col(4);
  }
}
Summa content
Secundarium content
html
<div class="example-container">
  <div class="example-row">
    <div class="example-content-main">Main content</div>
    <div class="example-content-secondary">Secondary content</div>
  </div>
</div>

Customising malesuada euismod

Utendo nostro constructo in eget Sass variabilium et in mappis, potest omnino mos praefinitas classes eget. Mutare numerum linearum, instrumentorum dimensionum interrogationum, et latitudines continens continens, deinde recompile.

Columnae et tetigisset domatum fistulas

Numerus columnarum malesuada euismod mutari potest per variabiles Sass. $grid-columnsest generare latitudines uniuscuiusque columnae, dum $grid-gutter-widthlatitudinem ponit pro canalibus columnae. $grid-row-columnsmaximum numerum columnarum exponere adhibetur .row-cols-*, quisquis numerus supra hunc modum ignoratur.

$grid-columns: 12 !default;
$grid-gutter-width: 1.5rem !default;
$grid-row-columns: 6 !default;

Eget versus

Ultra ipsas columnas movens, etiam numerum ordinum euismod mos esto. Si quattuor tantum ordines egetis esses, renovare velis $grid-breakpointset $container-max-widthsad aliquid simile:

$grid-breakpoints: (
  xs: 0,
  sm: 480px,
  md: 768px,
  lg: 1024px
);

$container-max-widths: (
  sm: 420px,
  md: 720px,
  lg: 960px
);

Cum aliquas mutationes in Sass variabilium aut tabularum faciens, debes mutationes tuas servare et rescribere. Faciens sic constituet notam-novam certam classium praedefinitorum gridum columnarum inversarum, exsertionum, ordinandorum. Utilitas responsiva visibilis etiam renovabitur ad usuario fracturae usu. Fac ut valores malesuada euismod in px(non rem, emvel %).