1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
---
title: '<canvas>: תגית ליצירת צורות דו מימדיות'
slug: Web/HTML/Element/canvas
translation_of: Web/HTML/Element/canvas
---
<div>{{HTMLRef}}</div>
<p dir="rtl">תגית <strong><code><canvas></code></strong> מאפשרת ליצור צורות דו מימדיות ולהטמיע אותן במסמך ה-HTML. <br>
אלמנט זה יוצר אזור מלבני בו ניתן לצייר באמצעות קוד.</p>
<div> </div>
<table>
<tbody>
<tr>
<th>קטגוריה</th>
<td>סקריפטים והטמעת תכנים</td>
</tr>
<tr>
<th>תגיות הורים מורשות</th>
<td><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> <br>
</td>
</tr>
<tr>
<th scope="row">ממשק DOM</th>
<td>{{domxref("HTMLCanvasElement")}}</td>
</tr>
</tbody>
</table>
<h2 dir="rtl" id="תארים">תארים</h2>
<p dir="rtl">תגית זו נכללת ברשימת <a href="https://developer.mozilla.org/he/docs/Web/HTML/%D7%AA%D7%90%D7%A8%D7%99%D7%9D_%D7%92%D7%9C%D7%95%D7%91%D7%9C%D7%99%D7%99%D7%9D">התארים הגלובליים</a>.</p>
<p dir="rtl">{{htmlattrdef("height")}} - תכונה להגדרת גובה.</p>
<p dir="rtl">{{htmlattrdef("width")}} - תכונה להגדרת רוחב.</p>
<dl>
<dt dir="rtl">
<h2 dir="rtl" id="דוגמא_-_כותרת_ופסקה">דוגמא - כותרת ופסקה</h2>
<pre><canvas id="canvas" width="300" height="300">
An alternative text describing what your canvas displays.
</canvas></pre>
<h4 dir="rtl" id="דדגכ">דדגכ</h4>
<pre><script>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(10, 10, 100, 100);
</script></pre>
</dt>
</dl>
<h2 dir="rtl" id="הערות">הערות</h2>
<p dir="rtl">* מומלץ להזין תוכן בין התגיות על מנת שזה יופיע במידה והדפדפן אינו תומך ב-Canvas.<br>
* חובה להוסיף תג סגירה <canvas/>.<br>
</p>
<h2 dir="rtl" id="ראה_גם">ראה גם</h2>
<ul>
<li dir="rtl"><a href="https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/HTML-canvas-guide/Introduction/Introduction.html">הקדמה ל-Canvas באתר Apple</a></li>
<li dir="rtl"><a href="https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial">מדריך למשתמש ב-Canvas</a></li>
<li dir="rtl"><a href="https://simon.html5.org/dump/html5-canvas-cheat-sheet.html">ריכוז תגיות ותכונות של Canvas</a></li>
</ul>
|