From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/he/web/html/element/canvas/index.html | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 files/he/web/html/element/canvas/index.html (limited to 'files/he/web/html/element/canvas/index.html') diff --git a/files/he/web/html/element/canvas/index.html b/files/he/web/html/element/canvas/index.html new file mode 100644 index 0000000000..eaac2dff23 --- /dev/null +++ b/files/he/web/html/element/canvas/index.html @@ -0,0 +1,70 @@ +--- +title: ': תגית ליצירת צורות דו מימדיות' +slug: Web/HTML/Element/canvas +translation_of: Web/HTML/Element/canvas +--- +
{{HTMLRef}}
+ +

תגית <canvas> מאפשרת ליצור צורות דו מימדיות ולהטמיע אותן במסמך ה-HTML. 
+ אלמנט זה יוצר אזור מלבני בו ניתן לצייר באמצעות קוד.

+ +
 
+ + + + + + + + + + + + + + + + +
קטגוריהסקריפטים והטמעת תכנים
תגיות הורים מורשות<abbr>, <audio>, <b>, <bdo>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <data>, <datalist>, <dfn>, <em>, <embed>, <i>, <iframe>, <img>, <input>, <kbd>, <keygen>, <label>, <mark>, <math>, <meter>, <noscript>, <object>, <output>, <progress>, <q>, <ruby>, <samp>, <script>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <textarea>, <time>, <var>, <video>, <wbr> 
+  
ממשק DOM{{domxref("HTMLCanvasElement")}}
+ +

תארים

+ +

תגית זו נכללת ברשימת התארים הגלובליים.

+ +

{{htmlattrdef("height")}} - תכונה להגדרת גובה.

+ +

{{htmlattrdef("width")}} - תכונה להגדרת רוחב.

+ +
+
+

דוגמא - כותרת ופסקה

+ +
<canvas id="canvas" width="300" height="300">
+  An alternative text describing what your canvas displays.
+</canvas>
+ +

דדגכ

+ +
<script>
+var canvas = document.getElementById('canvas');
+var ctx = canvas.getContext('2d');
+ctx.fillStyle = 'green';
+ctx.fillRect(10, 10, 100, 100);
+</script>
+
+
+ +

הערות

+ +

* מומלץ להזין תוכן בין התגיות על מנת שזה יופיע במידה והדפדפן אינו תומך ב-Canvas.
+ * חובה להוסיף תג סגירה <canvas/>.
+  

+ +

ראה גם

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