Grilă

Exemple de cod

7
0

grilă css

.item-a {
  grid-area: header;
}
.item-b {
  grid-area: main;
}
.item-c {
  grid-area: sidebar;
}
.item-d {
  grid-area: footer;
}

.container {
  display: grid;
  grid-template-columns: 50px 50px 50px 50px;
  grid-template-rows: auto;
  grid-template-areas: 
    "header header header header"
    "main main . sidebar"
    "footer footer footer footer";
}
0
0

css grid exemplu

<!-- HTML code -->
<div class="wrapper">
  <div class="box">A</div><div class="box">B</div><div class="box">C</div>
  <div class="box">D</div><div class="box">E</div><div class="box">F</div>
</div>

<!-- Css code -->
<style>
.wrapper {
  display: grid;
  grid-template-columns: 100px 100px 100px;
  grid-gap: 10px;
  background-color: #fff;
  color: #444;
}
.box {
  background-color: #444;
  color: #fff;
  border-radius: 5px;
  padding: 20px;
  font-size: 150%;
}
</style>
0
0

alegeți poziția grilei html

/* grid-column: <start> / <end>;  */
/* grid-row: <start> / span <length>;  */
/* i.e */
grid-column: 3 / span 2;
grid-row: 2 / 4;
grid-row: 4;
0
0

grilă

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr 0.1fr 2.5fr 1fr;
  grid-template-rows: 1.2fr 0.6fr 1.4fr 1fr;
  gap: 0px 0px;
  grid-template-areas:
    ". . . . ."
    ". . . . ."
    ". . . . ."
    ". . . . .";
}

<div class="grid-container"></div>
0
0

grila de afișare

.container {
  display: grid | inline-grid;
}
0
0

css grilă

.container {
  grid-template-columns: [first] 40px [line2] 50px [line3] auto [col4-start] 50px [five] 40px [end];
  grid-template-rows: [row1-start] 25% [row1-end] 100px [third-line] auto [last-line];
}

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................