Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. CSS
  3. Référence
  4. Propriétés CSS
  5. border-block-width

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 EnglishAlways switch to English

border-block-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 avril 2021.

La propriétéCSSborder-block-width définit la largeur des bordures logiques de bloc d'un élément, qui correspond à une largeur de bordure physique selon le mode d'écriture, la direction et l'orientation du texte de l'élément. Elle peut correspondre aux propriétésborder-top-width etborder-bottom-width, ouborder-left-width etborder-right-width selon les valeurs définies pourwriting-mode,direction ettext-orientation.

La largeur de bordure dans l'autre dimension peut être définie avecborder-inline-width, qui définitborder-inline-start-width etborder-inline-end-width.

Exemple interactif

border-block-width: thick;writing-mode: horizontal-tb;
border-block-width: thick;writing-mode: vertical-rl;
border-block-width: 4px;writing-mode: horizontal-tb;direction: rtl;
<section>  <div>    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-block-width: 5px;border-block-width: thick;/* Valeurs globales */border-block-width: inherit;border-block-width: initial;border-block-width: revert;border-block-width: revert-layer;border-block-width: unset;

Valeur

<'border-width'>

La largeur de la bordure. Voirborder-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 vautnone ouhidden
Type d'animationpar type de valeur calculée

Syntaxe formelle

border-block-width =
<'border-top-width'>{1,2}

<border-top-width> =
<line-width>

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

Exemples

Bordure avec du texte vertical

HTML

html
<div>  <p>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-block-width: 5px 10px;}

Résultat

Spécifications

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

Compatibilité des navigateurs

Voir aussi

Help improve MDN

Learn how to contribute

Cette page a été modifiée le par lescontributeurs du MDN.


[8]ページ先頭

©2009-2026 Movatter.jp