aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/css/image-orientation/index.md
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-09-17 20:58:15 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-10-12 07:57:33 +0200
commit149319bb8c7b1394a443f0877c3460cd362aa815 (patch)
treed534abb0cbc87d5e224836e9d6b888aa58564aa0 /files/fr/web/css/image-orientation/index.md
parenteb9de0363cb273b54d3f5402bbf4e3bc03c60971 (diff)
downloadtranslated-content-149319bb8c7b1394a443f0877c3460cd362aa815.tar.gz
translated-content-149319bb8c7b1394a443f0877c3460cd362aa815.tar.bz2
translated-content-149319bb8c7b1394a443f0877c3460cd362aa815.zip
move *.html to *.md
Diffstat (limited to 'files/fr/web/css/image-orientation/index.md')
-rw-r--r--files/fr/web/css/image-orientation/index.md134
1 files changed, 134 insertions, 0 deletions
diff --git a/files/fr/web/css/image-orientation/index.md b/files/fr/web/css/image-orientation/index.md
new file mode 100644
index 0000000000..1e5b7e4b90
--- /dev/null
+++ b/files/fr/web/css/image-orientation/index.md
@@ -0,0 +1,134 @@
+---
+title: image-orientation
+slug: Web/CSS/image-orientation
+tags:
+ - CSS
+ - Experimental
+ - Propriété
+ - Reference
+translation_of: Web/CSS/image-orientation
+---
+<div>{{CSSRef}}</div>
+
+<p>La propriété <strong><code>image-orientation</code></strong> décrit la façon d'obtenir l'orientation correcte d'une image quelle que soit la disposition du document. Cette propriété ne doit pas être utilisée afin de tourner l'image pour d'autres cas, si besoin, on pourra utiliser la propriété {{cssxref("transform")}} avec la fonction <code>rotate</code>.</p>
+
+<div class="warning">
+<p><strong>Attention :</strong> Cette propriété sera vraisemblablement dépréciée prochainement. Les fonctionnalités associées deviendront des propriétés de l'élément {{HTMLElement("img")}} et/ou de l'élément {{HTMLElement("picture")}} (excepté peut-être <code>from-image</code>).</p>
+</div>
+
+<pre class="brush:css no-line-numbers">/* Valeurs d'angle */
+/* Type &lt;angle&gt; */
+image-orientation: 0deg;
+image-orientation: 6.4deg; /* Arrondie à 0deg */
+image-orientation: -90deg; /* Équivalent à 270deg, la
+ valeur calculée normalisée */
+
+/* Valeurs avec un mot-clé */
+image-orientation: from-image; /* Utilise les données EXIF
+ de l'image */
+image-orientation: flip; /* Pas de rotation mais un
+ retournement horizontal */
+
+/* Valeurs avec deux arguments */
+image-orientation: 90deg flip; /* Rotation de 90deg, puis
+ retournement horizontal */
+
+/* Valeurs globales */
+image-orientation: inherit;
+image-orientation: initial;
+image-orientation: unset;
+</pre>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<h3 id="Valeurs">Valeurs</h3>
+
+<dl>
+ <dt><code>from-image</code></dt>
+ <dd>Les informations EXIF contenues dans l'image seront utilisées pour tourner l'image de façon appropriée.</dd>
+ <dt><code>&lt;angle&gt;</code></dt>
+ <dd>Une valeur de type {{cssxref("&lt;angle&gt;")}} qui indique la rotation à appliquer à l'image. Cette valeur est arrondie au quart de tour le plus proche.</dd>
+ <dt><code>flip</code></dt>
+ <dd>L'image est retournée horizontalement (comme une réflexion) après que la rotation d'angle indiqué par le premier paramètre ait été appliquée. Si aucun argument d'angle n'a été fourni, la valeur <code>0deg</code> sera utilisée.</dd>
+</dl>
+
+<h3 id="Syntaxe_formelle">Syntaxe formelle</h3>
+
+{{csssyntax}}
+
+<h2 id="Notes_d'utilisation">Notes d'utilisation</h2>
+
+<p>Cette propriété n'est pas conçue pour appliquer une rotation arbitraire sur une image. Elle permet uniquement de corriger un orientation erronée. C'est pour cette raison que la valeur est arrondie au quart de tour le plus proche.</p>
+
+<p>De la même façon, cette propriété n'est pas conçue pour gérer le passage de paysage en portrait. <code>image-orientation</code> ne modifie que les images, il faudrait apporter les modifications au niveau de la disposition.</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css">#image {
+ /* Peut-être modifiée dans l'exemple */
+ image-orientation: flip;
+}
+</pre>
+
+<pre class="brush: html hidden">&lt;img id="image" src="https://mdn.mozillademos.org/files/12668/MDN.svg"
+ alt="Orientation déterminée à partir de l'image"/&gt;
+&lt;select id="imageOrientation"&gt;
+ &lt;option value="from-image"&gt;from-image&lt;/option&gt;
+ &lt;option value="90deg"&gt;90deg&lt;/option&gt;
+ &lt;option value="flip" selected&gt;flip&lt;/option&gt;
+&lt;/select&gt;
+</pre>
+
+<pre class="brush: js hidden">var imageOrientation = document.getElementById("imageOrientation");
+imageOrientation.addEventListener("change", function (evt) {
+ document.getElementById("image").style.imageOrientation = evt.target.value;
+});
+</pre>
+
+<h3 id="Résultat">Résultat</h3>
+
+<p>{{EmbedLiveSample("Exemples", "100%", 240)}}</p>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">État</th>
+ <th scope="col">Commentaires</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS4 Images', '#image-orientation', 'image-orientation')}}</td>
+ <td>{{Spec2('CSS4 Images')}}</td>
+ <td>Ajout des mots-clés <code>from-image</code> et <code>flip</code>.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Images', '#image-orientation', 'image-orientation')}}</td>
+ <td>{{Spec2('CSS3 Images')}}</td>
+ <td>Définition initiale.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+
+<p>{{Compat("css.properties.image-orientation")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{cssxref("object-fit")}}</li>
+ <li>{{cssxref("object-position")}}</li>
+ <li>{{cssxref("image-orientation")}}</li>
+ <li>{{cssxref("image-rendering")}}</li>
+ <li>{{cssxref("image-resolution")}}</li>
+ <li>{{cssxref("transform")}}</li>
+ <li>{{cssxref("rotate")}}</li>
+</ul>