From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/fr/web/css/background-position-x/index.html | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 files/fr/web/css/background-position-x/index.html (limited to 'files/fr/web/css/background-position-x') diff --git a/files/fr/web/css/background-position-x/index.html b/files/fr/web/css/background-position-x/index.html new file mode 100644 index 0000000000..b80a85a4da --- /dev/null +++ b/files/fr/web/css/background-position-x/index.html @@ -0,0 +1,108 @@ +--- +title: background-position-x +slug: Web/CSS/background-position-x +tags: + - CSS + - Experimental + - Propriété + - Reference +translation_of: Web/CSS/background-position-x +--- +
{{CSSRef}}
+ +

La propriété background-position-x définit la position horizontale initiale de chaque image d'arrière-plan par rapport à l'origine, définie avec {{cssxref("background-origin")}}.

+ +

Pour plus d'informations, se référer à la documentation de la propriété {{cssxref("background-position")}} qui existe depuis plus longtemps.

+ +
{{EmbedInteractiveExample("pages/css/background-position-x.html")}}
+ + + +
Note : La valeur de cette propriété sera surchargée par n'importe quelle déclaration avec  {{cssxref("background")}} ou {{cssxref("background-position")}} située après la déclaration de background-position-x.
+ +

Syntaxe

+ +
/* Valeurs avec un mot-clé */
+background-position-x: left;
+background-position-x: right;
+background-position-x: center;
+
+/* Valeurs proportionnelles */
+/* Type <percentage>        */
+background-position-x: 25%;
+
+/* Valeurs de longueur */
+/* Type <length>       */
+background-position-x: 0px;
+background-position-x: 1cm;
+background-position-x: 8em;
+
+/* Déclaration indiquant un décalage  */
+/* relatif à un des côtés de la boîte */
+background-position-x: right 3px;
+
+/* Gestion de plusieurs valeurs */
+/* pour plusieurs arrières-plan */
+background-position-x: 0px, center;
+
+/* Valeurs globales */
+background-position-x: inherit;
+background-position-x: initial;
+background-position-x: unset;
+
+ +

Valeurs

+ +
+
left
+
Le bord gauche de l'image d'arrière-plan est aligné avec le bord gauche de la zone dédiée à l'arrière-plan.
+
center
+
L'image d'arrière-plan est centrée horizontalement par rapport à la zone dédiée à l'arrière-plan.
+
right
+
Le côté droit de l'image d'arrière-plan est aligné avec le côté droit de la zone dédiée à l'arrière-plan.
+
<length>
+
Une valeur de longueur (type {{cssxref("<length>")}}) qui définit le décalage horizontal de l'arrière-plan correspondant par rapport à un bord vertical de la zone d'arrière-plan. Si aucun côté n'est indiqué, l'écart fera référence au côté gauche.
+
<percentage>
+
Une valeur en pourcentages (type {{cssxref("<percentage>")}}) qui définit le décalage horizontal de l'arrière-plan correspondant par rapport à un bord vertical de la zone d'arrière-plan, proportionnellement à la largeur de la zone. Si aucun côté n'est indiqué, l'écart fera référence au côté gauche.
+
+ +

Syntaxe formelle

+ +
{{csssyntax}}
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('CSS4 Backgrounds', '#background-position-longhands', 'background-position-x')}}{{Spec2('CSS4 Backgrounds')}}Spécification initiale pour les propriétés détaillées de {{cssxref("background-position")}}, implémentée depuis longtemps.
+ +

{{cssinfo}}

+ +

Compatibilité des navigateurs

+ + + +

{{Compat("css.properties.background-position-x")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf