aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/css/transform-function/rotate()/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/css/transform-function/rotate()/index.html')
-rw-r--r--files/pt-br/web/css/transform-function/rotate()/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/pt-br/web/css/transform-function/rotate()/index.html b/files/pt-br/web/css/transform-function/rotate()/index.html
new file mode 100644
index 0000000000..5f7b4270d0
--- /dev/null
+++ b/files/pt-br/web/css/transform-function/rotate()/index.html
@@ -0,0 +1,85 @@
+---
+title: rotate()
+slug: Web/CSS/transform-function/rotate()
+translation_of: Web/CSS/transform-function/rotate()
+---
+<p>{{CSSRef}}</p>
+
+<p>A função <a href="/en-US/docs/Web/CSS">CSS</a> <strong><code>rotate()</code></strong> <span class="short_text" id="result_box" lang="pt"><span>define uma transformação que</span></span> gira um elemento <span class="short_text" id="result_box" lang="pt"><span>em torno de um ponto fixo no plano 2D</span></span>, <span class="short_text" id="result_box" lang="pt"><span>sem deformá-lo</span></span>. O resultado é um tipo de dados {{cssxref("&lt;transform-function&gt;")}}.</p>
+
+<p><img src="https://mdn.mozillademos.org/files/12113/rotate.png" style="height: 175px; width: 258px;"></p>
+
+<p><span class="short_text" id="result_box" lang="pt"><span>O eixo de rotação passa por uma origem,</span></span> definido pela propriedade CSS {{ cssxref("transform-origin") }}.</p>
+
+<h2 id="Sintaxe"><span class="short_text" id="result_box" lang="pt"><span>Sintaxe</span></span></h2>
+
+<p><span class="short_text" id="result_box" lang="pt"><span>A quantidade de rotação criada por </span></span><code>rotate()</code> <span class="short_text" id="result_box" lang="pt"><span>é especificado por um</span></span> {{cssxref("&lt;angle&gt;")}}. <span class="short_text" id="result_box" lang="pt"><span>Se positivo, o movimento será no sentido horário</span></span>; Se negativo, <span class="short_text" id="result_box" lang="pt"><span>ela será no sentido anti-horário. </span></span> <span id="result_box" lang="pt"><span>Uma rotação de 180° é chamada de </span></span><em>point reflection (</em><span lang="pt"><span>reflexão do ponto).</span></span></p>
+
+<pre class="syntaxbox notranslate">rotate(<em>a</em>)
+</pre>
+
+<h3 id="Valores">Valores</h3>
+
+<dl>
+ <dt><code>a</code></dt>
+ <dd>É um {{ cssxref("&lt;angle&gt;") }} <span class="short_text" id="result_box" lang="pt"><span>representando o ângulo da rotação.</span></span> <span id="result_box" lang="pt"><span>Um ângulo positivo indica uma rotação no sentido horário, </span></span><span class="short_text" id="result_box" lang="pt"><span>um ângulo negativo no sentido anti-horário.</span></span></dd>
+</dl>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col"><span class="short_text" id="result_box" lang="pt"><span>Coordenadas cartesianas em</span></span> ℝ<sup>2</sup></th>
+ <th scope="col"><span class="short_text" id="result_box" lang="pt"><span>Coordenadas homogêneas em</span></span> ℝℙ<sup>2</sup></th>
+ <th scope="col"><span class="short_text" id="result_box" lang="pt"><span>Coordenadas cartesianas em</span></span> ℝ<sup>3</sup></th>
+ <th scope="col"><span class="short_text" id="result_box" lang="pt"><span>Coordenadas homogêneas em</span></span> ℝℙ<sup>3</sup></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan="1" rowspan="2"><math> <mfenced> <mtable> <mtr><mtd>cos(a)</mtd><mtd>-sin(a)</mtd></mtr> <mtr><mtd>sin(a)</mtd><mtd>cos(a)</mtd></mtr></mtable></mfenced></math></td>
+ <td><math> <mfenced><mtable><mtr><mtd>cos(a)</mtd><mtd>-sin(a)</mtd><mtd>0</mtd></mtr><mtr><mtd>sin(a)</mtd><mtd>cos(a)</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
+ <td colspan="1" rowspan="2"><math> <mfenced><mtable><mtr><mtd>cos(a)</mtd><mtd>-sin(a)</mtd><mtd>0</mtd></mtr><mtr><mtd>sin(a)</mtd><mtd>cos(a)</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
+ <td colspan="1" rowspan="2"><math> <mfenced><mtable><mtr><mtd>cos(a)</mtd><mtd>-sin(a)</mtd><mtd>0</mtd><mtd>0</mtd></mtr><mtr><mtd>sin(a)</mtd><mtd>cos(a)</mtd><mtd>0</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
+ </tr>
+ <tr>
+ <td><code>[cos(a) sin(a) -sin(a) cos(a) 0 0]</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html notranslate">&lt;div&gt;Normal&lt;/div&gt;
+&lt;div class="rotated"&gt;Rotated&lt;/div&gt;</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css notranslate">div {
+ width: 80px;
+ height: 80px;
+ background-color: skyblue;
+}
+
+.rotated {
+ transform: rotate(45deg); /* Equal to rotateZ(45deg) */
+ background-color: pink;
+}
+</pre>
+
+<h3 id="Resultado">Resultado</h3>
+
+<p>{{EmbedLiveSample("Examples", "auto", 180)}}</p>
+
+<h2 id="Compatibilidade_do_navegador"><span class="short_text" id="result_box" lang="pt"><span>Compatibilidade do navegador</span></span></h2>
+
+<p>Por favor, veja o tipo de dados <code><a href="/en-US/docs/Web/CSS/transform-function#Browser_compatibility">&lt;transform-function&gt;</a></code> para informações de <span id="result_box" lang="pt"><span>compatibilidade</span></span>.</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{cssxref("transform")}}</li>
+ <li>{{cssxref("&lt;transform-function&gt;")}}</li>
+ <li><code><a href="/en-US/docs/Web/CSS/transform-function/rotate3d">rotate3d()</a></code></li>
+</ul>