aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/css/_colon_required/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ca/web/css/_colon_required/index.html')
-rw-r--r--files/ca/web/css/_colon_required/index.html128
1 files changed, 128 insertions, 0 deletions
diff --git a/files/ca/web/css/_colon_required/index.html b/files/ca/web/css/_colon_required/index.html
new file mode 100644
index 0000000000..ee1d7cffc5
--- /dev/null
+++ b/files/ca/web/css/_colon_required/index.html
@@ -0,0 +1,128 @@
+---
+title: ':required'
+slug: 'Web/CSS/:required'
+tags:
+ - CSS
+ - Layout
+ - Pseudo-class
+ - Reference
+ - Web
+translation_of: 'Web/CSS/:required'
+---
+<div>{{ CSSRef }}</div>
+
+<p>La <a href="/en-US/docs/Web/CSS/Pseudo-classes">pseudo-class</a> <a href="/en-US/docs/Web/CSS">CSS</a> <strong><code>:required</code></strong> representa qulasevol element {{HTMLElement("input")}}, {{HTMLElement("select")}} o {{HTMLElement("textarea")}} que té l'atribut {{ htmlattrxref("required", "input") }} establert en ell.</p>
+
+<pre class="brush: css no-line-numbers">/* Selecciona qualsevol &lt;input&gt; requerit */
+input:required {
+ border: 1px dashed red;
+}</pre>
+
+<p>Aquesta pseudo-class és útil per ressaltar els camps que han de tenir dades vàlides abans de poder enviar un formulari.</p>
+
+<div class="note">
+<p><strong>Nota:</strong> La classe pseudo-class {{cssxref(":optional")}} selecciona camps de formulari opcionals.</p>
+</div>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Exemples">Exemples</h2>
+
+<p>Veure {{ cssxref(":invalid") }} com exemple.</p>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentari</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('HTML WHATWG', '#selector-required', ':required') }}</td>
+ <td>{{ Spec2('HTML WHATWG') }}</td>
+ <td>Sense canvis.</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('HTML5 W3C', '#selector-required', ':required') }}</td>
+ <td>{{ Spec2('HTML5 W3C') }}</td>
+ <td><span id="result_box" lang="ca"><span>Defineix la semàntica respecte a HTML i la validació de restriccions.</span></span></td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS4 Selectors', '#opt-pseudos', ':required') }}</td>
+ <td>{{ Spec2('CSS4 Selectors') }}</td>
+ <td>Sense canvis.</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('CSS3 Basic UI', '#pseudo-required-value', ':required') }}</td>
+ <td>{{ Spec2('CSS3 Basic UI') }}</td>
+ <td><span id="result_box" lang="ca"><span>Defineix</span> <span>la</span> <span>pseudo</span><span>-</span><span>classe,</span> <span>però no</span> <span>la semàntica</span> <span>associada.</span></span></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Navegadors_compatibles">Navegadors compatibles</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Descripció</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>10.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoDesktop("2") }}</td>
+ <td>10</td>
+ <td>10.0</td>
+ <td>5.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Descripció</th>
+ <th>Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>4.4.4</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoMobile("2") }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>10.0</td>
+ <td>5.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>Altres pseudo-classes relacionades amb la validació: {{ cssxref(":optional") }}, {{ cssxref(":invalid") }}, {{ cssxref(":valid") }}</li>
+ <li><a href="/en-US/docs/Learn/HTML/Forms/Form_validation">Validació de dades del formulari</a></li>
+</ul>