aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/html/element/canvas
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/html/element/canvas
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pt-br/web/html/element/canvas')
-rw-r--r--files/pt-br/web/html/element/canvas/index.html130
1 files changed, 130 insertions, 0 deletions
diff --git a/files/pt-br/web/html/element/canvas/index.html b/files/pt-br/web/html/element/canvas/index.html
new file mode 100644
index 0000000000..fc82268ae7
--- /dev/null
+++ b/files/pt-br/web/html/element/canvas/index.html
@@ -0,0 +1,130 @@
+---
+title: canvas
+slug: Web/HTML/Element/canvas
+translation_of: Web/HTML/Element/canvas
+---
+<h2 id="Sumário">Sumário</h2>
+
+<p>O elemento HTML <em>Canvas</em> (<code>&lt;canvas&gt;</code>) pode ser utilizado para desenhar gráficos utilizando scripts (geralmente <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>). Por exemplo, além de desenhar gráficos, ele pode ser usado para fazer composições de fotos e também para animações. Você poderá colocar conteúdos alternativos dentro do bloco <code>&lt;canvas&gt;</code>. Este conteúdo será renderizado também em navegadores antigos e em navegadores com JavaScript desabilitado.</p>
+
+<p>Para mais artigos sobre canvas, veja <a href="/en/HTML/Canvas" title="en/HTML/Canvas">canvas topic page</a>.</p>
+
+<h2 id="Contexto_de_uso">Contexto de uso</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td>Conteúdo permitido</td>
+ <td>Transparente, tanto <a href="/en/HTML/Content_categories#phrasing_content" title="en/HTML/Content categories#phrasing content">phrasing content</a> ou <a href="/en/HTML/Content_categories#flow_content" title="en/HTML/Content categories#flow content">flow content</a>.</td>
+ </tr>
+ <tr>
+ <td>Omissão de tags</td>
+ <td>Nenhuma, tanto a tag de início quanto a de fim devem ser incluídas.</td>
+ </tr>
+ <tr>
+ <td>Elementos "pai" permitidos</td>
+ <td>Qualquer elemento que aceite <a href="/en/HTML/Content_categories#phrasing_content" title="en/HTML/Content categories#phrasing content">phrasing content</a> ou <a href="/en/HTML/Content_categories#flow_content" title="en/HTML/Content categories#flow content">flow content</a>. </td>
+ </tr>
+ <tr>
+ <td>Documento normativo</td>
+ <td><a class="external" href="http://www.w3.org/TR/html5/the-canvas-element.html#the-canvas-element" title="http://www.w3.org/TR/html5/the-canvas-element.html#the-canvas-element">HTML 5, section 4.8.10</a></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Atributos">Atributos</h2>
+
+<p>Como qualquer outro elemento HTML, este também tem <a href="/en/HTML/Global_attributes" title="en/HTML/Global attributes">global attributes</a>.</p>
+
+<dl>
+ <dt>{{ htmlattrdef("width") }}</dt>
+ <dd> A largura do espaço em pixels CSS. O padrão é 300.</dd>
+ <dt>{{ htmlattrdef("height") }}</dt>
+ <dd>A altura do espaço em pixels CSS. O padrão é 150.</dd>
+</dl>
+
+<p>{{ Note("The displayed size of the canvas can be changed using a stylesheet. The image is scaled during rendering to fit the styled size.") }}</p>
+
+<h2 id="Interface_DOM">Interface DOM</h2>
+
+<ul>
+ <li><a href="/en/DOM/HTMLCanvasElement" title="en/DOM/HTMLCanvasElement">HTMLCanvasElement</a></li>
+</ul>
+
+<h2 id="Exemplo">Exemplo</h2>
+
+<pre class="brush: html">&lt;<span class="start-tag">canvas</span><span class="attribute-name"> id</span>=<span class="attribute-value">"canvas" </span><span class="attribute-name">width</span>=<span class="attribute-value">"300" </span><span class="attribute-name">height</span>=<span class="attribute-value">"300"</span>&gt;
+ Desculpe-me, seu navegador não suporta o elemento &amp;<span class="entity">lt;</span>canvas&amp;<span class="entity">gt;</span>.
+&lt;/<span class="end-tag">canvas</span>&gt;
+</pre>
+
+<h2 id="Compatibilidade_com_navegadores">Compatibilidade com navegadores</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Recurso</th>
+ <th>Firefox (Gecko)</th>
+ <th>Chrome</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suporte básico</td>
+ <td>{{ CompatGeckoDesktop("1.8") }}</td>
+ <td>1.0</td>
+ <td>9.0</td>
+ <td><a class="external" href="http://www.opera.com/docs/changelogs/windows/900/" title="http://www.opera.com/docs/changelogs/windows/900/">9.0</a></td>
+ <td><a class="external" href="http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/HTML-canvas-guide/Introduction/Introduction.html" title="http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/HTML-canvas-guide/Introduction/Introduction.html">2.0</a></td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Recurso</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Android</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatGeckoMobile("1.8") }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>1.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h3 id="Notas_específicas_sobre_navegadores">Notas específicas sobre navegadores</h3>
+
+<h4 id="Firefox_(Gecko)">Firefox (Gecko)</h4>
+
+<ul>
+ <li>Antes do Gecko 5.0 {{ geckoRelease("5.0") }}, a altura e a largura do elemento canvas eram <em>integers</em> verificados.</li>
+ <li>Anteriormente ao Gecko 6.0 {{ geckoRelease("6.0") }}, um elemento {{ HTMLElement("canvas") }} com altura e largura iguais a zero eram renderizados como se tivesse as dimensões padrão.</li>
+ <li>Antes do Gecko 12.0 {{ geckoRelease("12.0") }}, se o JavaScript estivesse desabilitado, o elemento <code>&lt;canvas&gt;</code> era renderizado ao invés de mostrar o conteúdo de <em>fallback</em>, conforme a <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html" title="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html">specification</a>.</li>
+</ul>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li><a href="/en/HTML/Canvas" title="https://developer.mozilla.org/en/HTML/Canvas">MDN canvas portal</a></li>
+ <li>Um <a href="/en/Canvas_tutorial" title="Canvas tutorial">canvas tutorial</a></li>
+ <li><a class="external" href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html" title="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html">Canvas cheat sheet</a></li>
+ <li><a href="/en-US/demos/tag/tech:canvas" title="https://developer.mozilla.org/en-US/demos/tag/tech:canvas/">Canvas-related demos</a></li>
+</ul>
+
+<p>{{ languages( { "de": "de/HTML/Element/canvas", "en": "en/HTML/Element/canvas", "es": "es/HTML/Elemento/canvas", "ja": "ja/HTML/Element/canvas", "ko": "ko/HTML/Element/canvas", "nl": "nl/HTML/HTML_Tags/canvas", "pl": "pl/HTML/Element/canvas", "ru": "Ru/HTML/Element/canvas", "zh-cn": "cn/HTML/Element/canvas", "fr": "fr/HTML/Element/canvas" } ) }}</p>