Saltar al contenido

Propiedad CSS column-rule-color

La propiedad column-rule-color establece el color de la regla.

La propiedad column-rule-color es una de las propiedades de CSS3.

El color de la regla también se puede especificar mediante la propiedad abreviada column-rule.

Puedes encontrar colores web en nuestra sección de colores HTML y probar a elegir tus colores preferidos con nuestra herramienta Selector de colores.

Valor inicialcurrentColor
Se aplica aElementos multicol.
HeredableNo.
AnimableSí. El color de la regla es animable.
VersiónCSS3
Sintaxis DOMobject.style.columnRuleColor = "#666";

Sintaxis

Sintaxis de la propiedad CSS column-rule-color

css
column-rule-color: color | initial | inherit;

Ejemplo de la propiedad column-rule-color:

Ejemplo de la propiedad CSS column-rule-color con el valor lightgreen

html
<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        column-count: 3;
        column-gap: 20px;
        column-rule-style: dashed;
        column-rule-color: lightgreen;
      }
    </style>
  </head>
  <body>
    <h1>The column-rule-color 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>

INFO

Puedes establecer valores hexadecimales, RGB, RGBA, HSL, HSLA o nombres de colores como valor para la propiedad column-rule-color.

Ejemplo de la propiedad column-rule-color con el valor "hexadecimal":

Ejemplo de la propiedad CSS column-rule-color con valor hexadecimal

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-color: #8ebf42;
      }
    </style>
  </head>
  <body>
    <h1>The column-rule-color 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>

Resultado

Propiedad CSS column-rule-color

Ejemplo de la propiedad column-rule-color con el valor "RGB":

Ejemplo de la propiedad CSS column-rule-color con valor RGB

html
<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        column-count: 3;
        column-gap: 40px;
        column-rule-style: double;
        column-rule-color: rgb(234, 211, 21);
      }
    </style>
  </head>
  <body>
    <h1>The column-rule-color 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>

Ejemplo de la propiedad column-rule-color con el valor "HSL":

Ejemplo de la propiedad CSS column-rule-color con valor HSL

html
<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        column-count: 3;
        column-gap: 30px;
        column-rule-style: solid;
        column-rule-color: hsl(351, 97%, 57%);
      }
    </style>
  </head>
  <body>
    <h1>The column-rule-color 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>

Valores

ValorDescripciónPruébalo
colorEstablece el color de la regla. Se pueden usar nombres de colores, códigos hexadecimales, rgb(), rgba(), hsl(), hsla().Pruébalo »
initialEstablece la propiedad en su valor predeterminado.Pruébalo »
inheritHereda la propiedad de su elemento padre.

Práctica

¿Cuál es el propósito de la propiedad CSS 'column-rule-color'?

¿Te resulta útil?

Vista previa dual-run — compárala con las rutas Symfony en producción.