From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../fr/web/api/htmlcanvaselement/height/index.html | 76 ---------------------- 1 file changed, 76 deletions(-) delete mode 100644 files/fr/web/api/htmlcanvaselement/height/index.html (limited to 'files/fr/web/api/htmlcanvaselement/height/index.html') diff --git a/files/fr/web/api/htmlcanvaselement/height/index.html b/files/fr/web/api/htmlcanvaselement/height/index.html deleted file mode 100644 index c56de245f4..0000000000 --- a/files/fr/web/api/htmlcanvaselement/height/index.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: HTMLCanvasElement.height -slug: Web/API/HTMLCanvasElement/height -tags: - - API - - Canvas - - HTMLCanvasElement - - Propriété -translation_of: Web/API/HTMLCanvasElement/height ---- -
-
-
{{APIRef("Canvas API")}}
-
-
- -

La propriété HTMLCanvasElement.height est un entier positif reflétant l'attribut HTML {{htmlattrxref("height", "canvas")}} de l'élément {{HTMLElement("canvas")}} mesuré en pixels CSS. Quand cet attribut n'est pas spécifié, ou si on lui affecte une valeur invalide, telle que négative, la valeur par défaut de 150 is utilisée.

- -

C'est l'une des deux propriétés, l'autre étant {{domxref("HTMLCanvasElement.width")}}, qui contrôlent la taille du canevas.

- -

Syntaxe

- -
var pxl = canvas.height;
-canvas.height = pxl;
-
- -

Exemples

- -

Étant donné cet élément {{HTMLElement("canvas")}} :

- -
<canvas id="canvas" width="300" height="300"></canvas>
-
- -

vous pouvez obtenir la hauteur du canevas avec le code suivant :

- -
var canvas = document.getElementById('canvas');
-console.log(canvas.height); // 300
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('HTML WHATWG', "scripting.html#attr-canvas-height", "HTMLCanvasElement.height")}}{{Spec2('HTML WHATWG')}}Pas de changement depuis l'instantané le plus récent, {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5.1', "scripting-1.html#attr-canvas-height", "HTMLCanvasElement.height")}}{{Spec2('HTML5.1')}} 
{{SpecName('HTML5 W3C', "scripting-1.html#attr-canvas-height", "HTMLCanvasElement.height")}}{{Spec2('HTML5 W3C')}}Instantané du {{SpecName('HTML WHATWG')}} contenant la définition initiale.
- -

Compatibilité des navigateurs

- -

{{Compat("api.HTMLCanvasElement.height")}}

- -

Voir aussi

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