padding-block-end
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since enero de 2020.
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 padding-block-end define el relleno de final de bloque lógico de un elemento, que se asigna a un relleno físico en función del modo de escritura, la direccionalidad y la orientación del texto del elemento. Corresponde a las propiedades padding-top, padding-right, padding-bottom, o padding-left dependiendo de los valores definidos por writing-mode, direction, y text-orientation.
Esto se relaciona con padding-block-start, padding-inline-start, y padding-inline-end, que define los otros rellenos del elemento.
Pruébalo
padding-block-end: 20px; writing-mode: horizontal-tb; padding-block-end: 20px; writing-mode: vertical-rl; padding-block-end: 5em; writing-mode: horizontal-tb; padding-block-end: 5em; writing-mode: vertical-lr; <section id="default-example"> <div class="transition-all" id="example-element"> <div class="box"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. </div> </div> </section> #example-element { border: 10px solid #ffc129; overflow: hidden; text-align: left; } .box { border: dashed 1px; unicode-bidi: bidi-override; } Sintaxis
/* <length> values */ padding-block-end: 10px; /* An absolute length */ padding-block-end: 1em; /* A length relative to the text size */ /* <percentage> value */ padding-block-end: 5%; /* A padding relative to the block container's width */ /* Global values */ padding-block-end: inherit; padding-block-end: initial; padding-block-end: unset; | Valor inicial | 0 |
|---|---|
| Applies to | all elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column |
| Heredable | no |
| Percentages | logical-width of containing block |
| Valor calculado | as <length> |
| Animation type | a length |
Valores
La propiedad padding-block-end toma los mismos valores de la propiedad padding-left.
Sintaxis formal
padding-block-end =
<'padding-top'>
<padding-top> =
<length-percentage [0,∞]>
<length-percentage> =
<length> |
<percentage>
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-lr; padding-block-end: 20px; background-color: #c8c800; } Especificaciones
| Specification |
|---|
| CSS Logical Properties and Values Level 1> # padding-properties> |
Compatibilidad con navegadores
Loading…
Mira también
- Las propiedades físicas mapeadas:
padding-top,padding-right,padding-bottom, ypadding-left writing-mode,direction,text-orientation