bUTschy.de

  • code

Flexbox 1

Bis ich es kann, war doch mit z.b. margin: x x x x; auch nicht so schwer ;)

.flex-item {
 flex-grow: 1; /* Wachstumsfaktor */
 flex-shrink: 1; /* Schrumpffaktor */
 flex-basis: 25rem; /* Basisbreite */
}

Oder das gleich in Kurz:

.flex-item {
 flex: 1 1 25rem;
}

Ich nenne es mal WSB.

Es sind folgende Angaben möglich:

  • flex 1: = flex: 1 1 0%;
  • flex: none = flex: 0 0 auto;
  • flex: auto = flex: 1 1 auto;
  • flex: initial = flex: 0 1 auto;
  • 0 Kommentare
  • 4402 Klicks

▼ Kommentare


Kommentar hinzufügen