Zum Inhalt springen

CSS-Eigenschaft column-rule-width

Die CSS-Eigenschaft column-rule-width definiert die Breite der Linie zwischen den Spalten. Die Eigenschaft column-rule-width ist eine der CSS3-Eigenschaften.

Die Eigenschaft column-rule-width wird nur wirksam, wenn column-rule-style nicht none ist.

Diese Eigenschaft hat die folgenden Werte:

  • medium
  • thick
  • thin
  • length

INFO

Die Spezifikation definiert die genaue Dicke der einzelnen Schlüsselwörter nicht. Sie folgen jedoch immer dieser Reihenfolge: thin ≤ medium ≤ thick.

Anfangswertmedium
Gilt fürMulticol-Elemente.
VererbtNein.
AnimierbarJa. Breite und Farbe der Linie sind animierbar.
VersionCSS3
DOM-Syntaxobject.style.columnRuleWidth = "5px";

Syntax

Syntax der CSS-Eigenschaft column-rule-width

css
column-rule-width: medium | thin | thick | length | initial | inherit;

Beispiel für die Eigenschaft column-rule-width:

Beispiel für die CSS-Eigenschaft column-rule-width mit dem Wert thick

html
<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        column-count: 3;
        column-gap: 40px;
        column-rule-style: dotted;
        column-rule-color: #666;
        column-rule-width: thick;
        text-align: justify;
      }
    </style>
  </head>
  <body>
    <h1>Column-rule-width property example</h1>
    <div>
      Lorem Ipsum is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </div>
  </body>
</html>

Ergebnis

CSS column-rule-width Property

Beispiel für die Eigenschaft column-rule-width mit dem Wert "thin":

Beispiel für die CSS-Eigenschaft column-rule-width mit dem Wert thin

html
<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        column-count: 3;
        column-gap: 40px;
        column-rule-style: solid;
        column-rule-width: thin;
        text-align: justify;
      }
    </style>
  </head>
  <body>
    <h1>Column-rule-width property example</h1>
    <div>
      Lorem Ipsum is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </div>
  </body>
</html>

Beispiel für die Eigenschaft column-rule-width, angegeben als "15px":

Beispiel für die CSS-Eigenschaft column-rule-width mit dem Wert length

html
<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        column-count: 3;
        column-gap: 40px;
        column-rule-style: groove;
        column-rule-color: #1c87c9;
        column-rule-width: 15px;
        text-align: justify;
      }
    </style>
  </head>
  <body>
    <h1>Column-rule-width property example</h1>
    <div>
      Lorem Ipsum is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </div>
  </body>
</html>

Werte

WertBeschreibungPlay it
mediumDie Linie ist mittel. Dies ist der Standardwert.Play it »
thickDie Linie ist dick.Play it »
thinDie Linie ist dünn.Play it »
lengthGibt die Breite der Linie an.Play it »
initialSetzt die Eigenschaft auf ihren Standardwert.Play it »
inheritErbt die Eigenschaft vom übergeordneten Element.

Practice

What does the 'column-rule-width' property do in CSS?

Finden Sie das nützlich?

Dual-run-Vorschau — vergleichen Sie mit den Symfony-Routen live.