From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- files/ca/web/css/_colon_in-range/index.html | 110 ---------------------------- 1 file changed, 110 deletions(-) delete mode 100644 files/ca/web/css/_colon_in-range/index.html (limited to 'files/ca/web/css/_colon_in-range/index.html') diff --git a/files/ca/web/css/_colon_in-range/index.html b/files/ca/web/css/_colon_in-range/index.html deleted file mode 100644 index fcfc316cd9..0000000000 --- a/files/ca/web/css/_colon_in-range/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: ':in-range' -slug: 'Web/CSS/:in-range' -tags: - - CSS - - Pseudo-class - - Reference - - Web -translation_of: 'Web/CSS/:in-range' ---- -
{{CSSRef}}
- -

La pseudo-class CSS :in-range representa un element {{htmlelement("input")}} en què el seu valor actual està dins dels límits de rang especificats pels atributs {{htmlattrxref("min", "input")}} i {{htmlattrxref("max","input")}}.

- -
/* Selecciona qualsevol <input>, però només quan té un rang especificat, i el seu valor està dins d'aquest rang */
-input:in-range {
-  background-color: rgba(0, 255, 0, 0.25);
-}
- -

Aquesta pseudo-class és útil per donar a l'usuari una indicació visual que el valor actual, d'un camp, està dins dels límits permesos.

- -
Nota Aquesta pseudo-class només s'aplica als elements que tenen (i poden tenir) una limitació de rang. Mancant tal limitació, l'element no pot estar "en rang" ni "fora de rang".
- -

Sintaxi

- -{{csssyntax}} - -

Exemple

- -
-

HTML

- -
<form action="" id="form1">
-  <ul>Values between 1 and 10 are valid.
-    <li>
-      <input id="value1" name="value1" type="number" placeholder="1 to 10" min="1" max="10" value="12">
-      <label for="value1">Your value is </label>
-    </li>
-  </ul>
-</form>
- -

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: 'okay.';
-}
-
-input:out-of-range + label::after {
-  content: 'out of range!';
-}
- -

Resultat

-
- -
{{EmbedLiveSample('Example', 600, 140)}}
- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - -
EspecificacióEstatComentari
{{SpecName('HTML WHATWG', 'scripting.html#selector-in-range', ':in-range')}}{{Spec2('HTML WHATWG')}}Defineix quan :in-range coincideix en elements HTML.
{{SpecName('CSS4 Selectors', '#in-range-pseudo', ':in-range')}}{{Spec2('CSS4 Selectors')}}Definició inicial.
- - - -
{{Compat("css.selectors.in-range")}}
- -

 

- -

Vegeu també

- - -- cgit v1.2.3-54-g00ecf