aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/css/backface-visibility/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/css/backface-visibility/index.html')
-rw-r--r--files/pt-br/web/css/backface-visibility/index.html257
1 files changed, 257 insertions, 0 deletions
diff --git a/files/pt-br/web/css/backface-visibility/index.html b/files/pt-br/web/css/backface-visibility/index.html
new file mode 100644
index 0000000000..7e8fa192e3
--- /dev/null
+++ b/files/pt-br/web/css/backface-visibility/index.html
@@ -0,0 +1,257 @@
+---
+title: backface-visibility
+slug: Web/CSS/backface-visibility
+translation_of: Web/CSS/backface-visibility
+---
+<p>{{CSSRef}}{{SeeCompatTable}}</p>
+
+<h2 id="Sumário">Sumário</h2>
+
+<p>A propriedade <a href="/en-US/docs/CSS" title="CSS">CSS</a> <strong><code>backface-visibility </code></strong>determina se deve ser exibido ou não a parte de trás do elemento para o usuário. A parte de trás de um elemento é sempre um fundo transparente, deixando, quando visível, uma imagem espelho da parte da frente a ser exibida.</p>
+
+<p>Há casos quando nós não queremos que a parte da frente de um elemento seja visível pela parte de trás, quando estamos fazendo um efeito de giro de cartões (colocando dois elementos lado a lado).</p>
+
+<p>Esta propriedade não possui nenhum efeito em transformações 2D quando não há nenhum tipo de perspectiva.</p>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="brush: css">backface-visibility: visible;
+backface-visibility: hidden;
+</pre>
+
+<h3 id="Valores">Valores</h3>
+
+<p>Esta propriedade tem dois valores (exclusivos):</p>
+
+<ul>
+ <li><code>visible</code> significa que a parte de trás estará visível, permitindo que a parte da frente seja exibida como espelho</li>
+ <li><code>hidden </code>significa que a parte de trás não é visível, sendo então escondida pela parte da frente do elemento</li>
+</ul>
+
+<h3 id="Sintaxe_formal">Sintaxe formal</h3>
+
+<dl>
+</dl>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="Cubos_com_faces_transparentes">Cubos com faces transparentes</h3>
+
+<h4 id="Conteúdo_HTML">Conteúdo HTML</h4>
+
+<pre class="brush: html">&lt;table&gt;
+ &lt;tbody&gt;
+ &lt;tr&gt;
+ &lt;th&gt;&lt;code&gt;backface-visibility: visible;&lt;/code&gt;&lt;/th&gt;
+ &lt;th&gt;&lt;code&gt;backface-visibility: hidden;&lt;/code&gt;&lt;/th&gt;
+ &lt;/tr&gt;
+ &lt;tr&gt;
+ &lt;td&gt;
+ &lt;div class="container"&gt;
+ &lt;div class="cube showbf"&gt;
+ &lt;div class="face front"&gt;1&lt;/div&gt;
+ &lt;div class="face back"&gt;2&lt;/div&gt;
+ &lt;div class="face right"&gt;3&lt;/div&gt;
+ &lt;div class="face left"&gt;4&lt;/div&gt;
+ &lt;div class="face top"&gt;5&lt;/div&gt;
+ &lt;div class="face bottom"&gt;6&lt;/div&gt;
+ &lt;/div&gt;
+ &lt;/div&gt;
+ &lt;p&gt; Todas as faces são transparentes e há três faces atrás que estão visíveis através das faces da frente.&lt;/p&gt;
+ &lt;/td&gt;
+ &lt;td&gt;
+ &lt;div class="container"&gt;
+ &lt;div class="cube hidebf"&gt;
+ &lt;div class="face front"&gt;1&lt;/div&gt;
+ &lt;div class="face back"&gt;2&lt;/div&gt;
+ &lt;div class="face right"&gt;3&lt;/div&gt;
+ &lt;div class="face left"&gt;4&lt;/div&gt;
+ &lt;div class="face top"&gt;5&lt;/div&gt;
+ &lt;div class="face bottom"&gt;6&lt;/div&gt;
+ &lt;/div&gt;
+ &lt;/div&gt;
+ &lt;p&gt;Nenhuma face é opaca, mas as três faces de trás estarão sempre escondidas agora.&lt;/p&gt;
+ &lt;/td&gt;
+ &lt;/tr&gt;
+ &lt;/tbody&gt;
+&lt;/table&gt;</pre>
+
+<h4 id="Conteúdo_CSS">Conteúdo CSS</h4>
+
+<pre class="brush: css">/* Shorthand classes that will show or hide the three back faces of the "cube" */
+.hidebf div {
+ backface-visibility: hidden;
+ -webkit-backface-visibility: hidden;
+}
+
+.showbf div {
+ backface-visibility: visible;
+ -webkit-backface-visibility: visible;
+}
+
+/* Define the container div, the cube div, and a generic face */
+.container {
+ width: 150px;
+ height: 150px;
+ margin: 75px 0 0 75px;
+ border: none;
+}
+
+.cube {
+ width: 100%;
+ height: 100%;
+ perspective: 550px;
+ perspective-origin: 150% 150%;
+ transform-style: preserve-3d;
+ -webkit-perspective: 300px;
+ -webkit-perspective-origin: 150% 150%;
+ -webkit-transform-style: preserve-3d;
+}
+
+.face {
+ display: block;
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ border: none;
+ line-height: 100px;
+ font-family: sans-serif;
+ font-size: 60px;
+ color: white;
+ text-align: center;
+}
+
+/* Define each face based on direction */
+.front {
+ background: rgba(0, 0, 0, 0.3);
+ transform: translateZ(50px);
+ -webkit-transform: translateZ(50px);
+}
+
+.back {
+ background: rgba(0, 255, 0, 1);
+ color: black;
+ transform: rotateY(180deg) translateZ(50px);
+ -webkit-transform: rotateY(180deg) translateZ(50px);
+}
+
+.right {
+ background: rgba(196, 0, 0, 0.7);
+ transform: rotateY(90deg) translateZ(50px);
+ -webkit-transform: rotateY(90deg) translateZ(50px);
+}
+
+.left {
+ background: rgba(0, 0, 196, 0.7);
+ transform: rotateY(-90deg) translateZ(50px);
+ -webkit-transform: rotateY(-90deg) translateZ(50px);
+}
+
+.top {
+ background: rgba(196, 196, 0, 0.7);
+ transform: rotateX(90deg) translateZ(50px);
+ -webkit-transform: rotateX(90deg) translateZ(50px)
+}
+
+.bottom {
+ background: rgba(196, 0, 196, 0.7);
+ transform: rotateX(-90deg) translateZ(50px);
+ -webkit-transform: rotateX(-90deg) translateZ(50px);
+}
+
+/* Make the table a little nicer */
+th, p, td {
+ background-color: #EEEEEE;
+ margin: 0px;
+ padding: 6px;
+ font-family: sans-serif;
+ text-align: left;
+}</pre>
+
+<h4 id="Resultado">Resultado</h4>
+
+<p>{{EmbedLiveSample('Cubos_com_faces_transparentes', 620, 460)}}</p>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comentário</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS3 Transforms', '#backface-visibility-property', 'backface-visibility')}}</td>
+ <td>{{Spec2('CSS3 Transforms')}}</td>
+ <td>Definição Inicial</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidade_de_Browsers">Compatibilidade de Browsers</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Funcionalidade</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Suporte básico</td>
+ <td>12{{property_prefix('-webkit')}}</td>
+ <td>{{CompatGeckoDesktop("10")}}{{property_prefix('-moz')}}<br>
+ {{CompatGeckoDesktop("16")}}</td>
+ <td>10</td>
+ <td>15{{property_prefix('-webkit')}}</td>
+ <td>{{CompatVersionUnknown}}{{property_prefix('-webkit')}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Funcionalidade</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suporte Básico</td>
+ <td>3.0{{property_prefix('-webkit')}}</td>
+ <td>{{CompatVersionUnknown}}{{property_prefix('-webkit')}}</td>
+ <td>{{CompatGeckoMobile("10")}}{{property_prefix('-moz')}}<br>
+ {{CompatGeckoMobile("16")}}</td>
+ <td>8.1<br>
+ <a href="https://msdn.microsoft.com/en-us/library/ie/hh772262(v=vs.85).aspx">11</a>{{property_prefix('-webkit')}}</td>
+ <td>{{CompatVersionUnknown}}{{property_prefix('-webkit')}}</td>
+ <td>{{CompatVersionUnknown}}{{property_prefix('-webkit')}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li><a href="/en-US/docs/CSS/Using_CSS_transforms" title="/en-US/docs/CSS/Using_CSS_transforms">Usando transformações CSS</a></li>
+</ul>