Cette page a été traduite à partir de l'anglais par la communauté. Vous pouvez contribuer en rejoignant la communauté francophone sur MDN Web Docs.

View in English Always switch to English

border-inline-end-width

Baseline Widely available

Cette fonctionnalité est bien établie et fonctionne sur de nombreux appareils et versions de navigateurs. Elle est disponible sur tous les navigateurs depuis janvier 2020.

La propriété CSS border-inline-end-width définit la largeur de la bordure logique en ligne de fin d'un élément, qui correspond à une bordure physique selon le mode d'écriture, la direction et l'orientation du texte de l'élément. Elle correspond à la propriété border-top-width, border-right-width, border-bottom-width, ou border-left-width, selon les valeurs définies pour writing-mode, direction et text-orientation.

Exemple interactif

border-inline-end-width: thick;
writing-mode: horizontal-tb;
border-inline-end-width: thick;
writing-mode: vertical-rl;
border-inline-end-width: 4px;
writing-mode: horizontal-tb;
direction: rtl;
<section class="default-example" id="default-example">
  <div class="transition-all" id="example-element">
    Ceci est une boîte avec une bordure autour.
  </div>
</section>
#example-element {
  background-color: palegreen;
  color: black;
  border: 0 solid crimson;
  padding: 0.75em;
  width: 80%;
  height: 100px;
  unicode-bidi: bidi-override;
}

Syntaxe

css
/* Valeurs de type <'border-width'> */
border-inline-end-width: 2px;
border-inline-end-width: thick;

/* Valeurs globales */
border-inline-end-width: inherit;
border-inline-end-width: initial;
border-inline-end-width: revert;
border-inline-end-width: revert-layer;
border-inline-end-width: unset;

Valeurs

<'border-width'>

La largeur de la bordure, voir border-width.

Définition formelle

Valeur initialemedium
Applicabilitétous les éléments
Héritéenon
Pourcentageslargeur logique du bloc englobant
Valeur calculéeune longueur absolue ; 0 si le style de la bordure vaut none ou hidden
Type d'animationby computed value type

Syntaxe formelle

border-inline-end-width = 
<line-width>

<line-width> =
<length [0,∞]> |
thin |
medium |
thick

Exemples

Appliquer une bordure avec texte vertical

HTML

html
<div>
  <p class="exempleTexte">Texte d'exemple</p>
</div>

CSS

css
div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exempleTexte {
  writing-mode: vertical-lr;
  border: 1px solid blue;
  border-inline-end-width: 5px;
}

Résultat

Spécifications

Specification
CSS Logical Properties and Values Module Level 1
# border-width

Compatibilité des navigateurs

Voir aussi