aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/css/_colon_out-of-range/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/css/_colon_out-of-range/index.html')
-rw-r--r--files/pt-br/web/css/_colon_out-of-range/index.html111
1 files changed, 111 insertions, 0 deletions
diff --git a/files/pt-br/web/css/_colon_out-of-range/index.html b/files/pt-br/web/css/_colon_out-of-range/index.html
new file mode 100644
index 0000000000..56ab889b6e
--- /dev/null
+++ b/files/pt-br/web/css/_colon_out-of-range/index.html
@@ -0,0 +1,111 @@
+---
+title: ':out-of-range'
+slug: 'Web/CSS/:out-of-range'
+translation_of: 'Web/CSS/:out-of-range'
+---
+<div>{{CSSRef}}</div>
+
+<p>A <a href="/en-US/docs/CSS/Pseudo-classes" title="Pseudo-classes">pseudo classe</a> de <a href="/en-US/docs/Web/CSS">CSS</a> <strong><code>:out-of-range</code></strong> representa um elemento de {{htmlelement("entrada")}} cujo valor atual esta fora dos limites especificados pelo {{htmlattrxref("min", "entrada")}} e {{htmlattrxref("max","entrada")}} atributos</p>
+
+<pre class="brush: css no-line-numbers">/* Selecione qualquer &lt;entrada&gt;, mas somente quando estiver dentros dos
+ limites especificados, e quando este valor estiver fora deste limite */
+input:out-of-range {
+ background-color: rgba(255, 0, 0, 0.25);
+}</pre>
+
+<p>Essa pseudo classe é muito útil por dar ao usuario uma indicacão visual de que o valor atual esta fora dos limites permitidos</p>
+
+<div class="note"><strong>Nota:</strong> Esta pseudo classe se aplica somente a elementos que tem (ou podem ter) uma limitacao. Na falta dessa de algo como essa limitacao, o elemento nao tera como ficar "in-range"(dentro dos limites) ou "out-of-range" (fora dos limites).</div>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Example" name="Example">Exemplo</h2>
+
+<div id="example">
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html">&lt;form action="" id="form1"&gt;
+ &lt;p&gt;Valores entre 1 e 10 são validos.&lt;/p&gt;
+ &lt;ul&gt;
+ &lt;li&gt;
+ &lt;input id="value1" name="value1" type="number" placeholder="1 to 10" min="1" max="10" value="12"&gt;
+ &lt;label for="value1"&gt;Seu valor está &lt;/label&gt;
+ &lt;/li&gt;
+ &lt;/ul&gt;
+&lt;/form&gt;</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css;">li {
+ list-style: none;
+ margin-bottom: 1em;
+}
+
+input {
+ border: 1px solid black;
+}
+
+input:in-range {
+ background-color: rgba(0, 255, 0, 0.25);
+}
+
+input:out-of-range {
+ background-color: rgba(255, 0, 0, 0.25);
+ border: 2px solid red;
+}
+
+input:in-range + label::after {
+ content: 'dentro dos limites.';
+}
+
+input:out-of-range + label::after {
+ content: 'Fora dos limites!';
+}</pre>
+
+<h3 id="Resultado">Resultado</h3>
+</div>
+
+<div>{{EmbedLiveSample('Example', 600, 140)}}</div>
+
+<h2 id="Specifications"><span>Specifications</span></h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'scripting.html#selector-out-of-range', ':out-of-range')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Define quando <code>:out-of-range</code> se iguala aos elementos em HTML.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS4 Selectors', '#out-of-range-pseudo', ':out-of-range')}}</td>
+ <td>{{Spec2('CSS4 Selectors')}}</td>
+ <td>Definicao inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+<div>
+
+
+<p>{{Compat("css.selectors.out-of-range")}}</p>
+</div>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{cssxref(":in-range")}}</li>
+ <li><a href="/en-US/docs/Learn/HTML/Forms/Form_validation">Form data validation</a></li>
+</ul>