border-block-start
Pruébalo
Experimental: Esta es una tecnología experimental
Comprueba la Tabla de compabilidad de navegadores cuidadosamente antes de usarla en producción.
La propiedad de CSS border-block-start
es una propiedad abreviada para establecer los valores lógicos individuales del borde de bloque inicial en un solo lugar en la hoja de estilos.
Sintaxis
border-block-start: 1px;
border-block-start: 2px dotted;
border-block-start: medium dashed blue;
border-block-start
puede ser usado para establecer los valores de uno o más de border-block-start-width
, border-block-start-style
, y border-block-start-color
. El borde físico al que se asigna depende del modo de escritura, la direccionalidad y la orientación del texto del elemento. Esto corresponde a las propiedades border-top
, border-right
, border-bottom
, o border-left
dependiendo de los valores definidos para writing-mode
, direction
, y text-orientation
.
Propiedades relacionadas son border-block-end
, border-inline-start
, y border-inline-end
, que definen los otros bordes del elemento.
Valor inicial | as each of the properties of the shorthand:
|
---|---|
Applies to | all elements |
Heredable | no |
Valor calculado | as each of the properties of the shorthand:
|
Animation type | as each of the properties of the shorthand: |
Valores
El border-block-start
es especificado con uno o más de los siguientes valores, en cualquier orden:
<'border-width'>
- El ancho del borde. Mira
border-width
. <'border-style'>
- El estilo de la línea del borde. Mira
border-style
. <'color'>
- El color del borde. Mira
color
.
Sintaxis formal
border-block-start =
<'border-top-width'> ||
<'border-top-style'> ||
<color>
<color> =
<absolute-color-base> |
currentcolor |
<system-color> |
<device-cmyk()>
<absolute-color-base> =
<hex-color> (en-US) |
<named-color> |
transparent |
<rgb()> |
<rgba()> |
<hsl()> |
<hsla()> |
<hwb()> |
<lab()> |
<lch()> |
<oklab()> |
<oklch()> |
<color()>
<device-cmyk()> =
device-cmyk( <cmyk-component>{4} [ / <alpha-value> ]? )
<rgb()> =
rgb( [ <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) |
rgb( [ <number> | none ]{3} [ / [ <alpha-value> | none ] ]? )
<hsl()> =
hsl( [ <hue> | none ] [ <percentage> | none ] [ <percentage> | none ] [ / [ <alpha-value> | none ] ]? )
<hwb()> =
hwb( [ <hue> | none ] [ <percentage> | none ] [ <percentage> | none ] [ / [ <alpha-value> | none ] ]? )
<lab()> =
lab( [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )
<lch()> =
lch( [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ <hue> | none ] [ / [ <alpha-value> | none ] ]? )
<oklab()> =
oklab( [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )
<oklch()> =
oklch( [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ <hue> | none ] [ / [ <alpha-value> | none ] ]? )
<color()> =
color( <colorspace-params> [ / [ <alpha-value> | none ] ]? )
<cmyk-component> =
<number> |
<percentage>
<alpha-value> =
<number> |
<percentage>
<hue> =
<number> |
<angle> |
none
<colorspace-params> =
<predefined-rgb-params> |
<xyz-params>
<predefined-rgb-params> =
<predefined-rgb> [ <number> | <percentage> | none ]{3}
<xyz-params> =
<xyz-space> [ <number> | none ]{3}
<predefined-rgb> =
srgb |
srgb-linear |
display-p3 |
a98-rgb |
prophoto-rgb |
rec2020
<xyz-space> =
xyz |
xyz-d50 |
xyz-d65
Ejemplo
Contenido HTML
<div>
<p class="exampleText">Example text</p>
</div>
Contenido CSS
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-rl;
border-block-start: 5px dashed blue;
}
Especificación
Especificación | Estado | Comentario |
---|---|---|
CSS Logical Properties and Values Level 1 La definición de 'border-block-start' en esta especificación. |
Editor's Draft | Definición Inicial |
Compatibilidad en navegadores
BCD tables only load in the browser
Mira también
- Esta propiedad se asigna a una de las propiedades del borde físico:
border-top
,border-right
,border-bottom
, oborder-left
. writing-mode
,direction
,text-orientation