aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/css/_colon_enabled
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/ca/web/css/_colon_enabled
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/ca/web/css/_colon_enabled')
-rw-r--r--files/ca/web/css/_colon_enabled/index.html155
1 files changed, 155 insertions, 0 deletions
diff --git a/files/ca/web/css/_colon_enabled/index.html b/files/ca/web/css/_colon_enabled/index.html
new file mode 100644
index 0000000000..0b6d579968
--- /dev/null
+++ b/files/ca/web/css/_colon_enabled/index.html
@@ -0,0 +1,155 @@
+---
+title: ':enabled'
+slug: 'Web/CSS/:enabled'
+tags:
+ - CSS
+ - Layout
+ - Pseudo-class
+ - Reference
+ - Web
+translation_of: 'Web/CSS/:enabled'
+---
+<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>:enabled</code></strong> representa qualsevol element habilitat. Un element està habilitat si es pot activar (seleccionar, fer clic en, teclejar, etc.) o acceptar l'enfocament. L'element també té un estat de deshabilitat, en el qual no es pot activar o acceptar l'enfocament.</p>
+
+<pre class="brush: css no-line-numbers">/* <span class="short_text" id="result_box" lang="ca"><span>Selecciona qualsevol</span></span> &lt;input&gt; habilitat */
+input:enabled {
+ color: blue;
+}</pre>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Exemple">Exemple</h2>
+
+<p>El següent exemple fa que el color del text i botó {{htmlElement("input")}} sigui verd quan està habilitat, i gris quan està deshabilitat. Això ajuda a l'usuari a comprendre amb quins elements pot interactuar.</p>
+
+<div id="Enabled_Disabled_Inputs_Example">
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush:html">&lt;form action="url_of_form"&gt;
+ &lt;label for="FirstField"&gt;First field (enabled):&lt;/label&gt;
+ &lt;input type="text" id="FirstField" value="Lorem"&gt;&lt;br&gt;
+
+ &lt;label for="SecondField"&gt;Second field (disabled):&lt;/label&gt;
+ &lt;input type="text" id="SecondField" value="Ipsum" disabled="disabled"&gt;&lt;br&gt;
+
+ &lt;input type="button" value="Submit"&gt;
+&lt;/form&gt;</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush:css;">input:enabled {
+ color: #2b2;
+}
+
+input:disabled {
+ color: #aaa;
+}
+</pre>
+
+<h3 id="Resultat">Resultat</h3>
+
+<p>{{EmbedLiveSample("Example", 550, 95)}}</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-enabled', ':enabled')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td><span class="short_text" id="result_box" lang="ca"><span>Cap canvi</span></span>.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', '#selector-enabled', ':enabled')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td><span class="short_text" id="result_box" lang="ca"><span>Defineix la semàntica per a HTML i formularis.</span></span></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS4 Selectors', '#enableddisabled', ':enabled')}}</td>
+ <td>{{Spec2('CSS4 Selectors')}}</td>
+ <td><span class="short_text" id="result_box" lang="ca"><span>Cap canvi</span></span> .</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Basic UI', '#pseudo-classes', ':enabled')}}</td>
+ <td>{{Spec2('CSS3 Basic UI')}}</td>
+ <td><span class="short_text" id="result_box" lang="ca"><span>Enllaços a selectors Nivell 3.</span></span></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Selectors', '#enableddisabled', ':enabled')}}</td>
+ <td>{{Spec2('CSS3 Selectors')}}</td>
+ <td>Defineix la pseudo-class, però no la semàntica associada.</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>1.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("1")}}</td>
+ <td>9.0</td>
+ <td>9.0</td>
+ <td>3.1</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>2.1</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile("1")}}</td>
+ <td>9.0</td>
+ <td>9.5</td>
+ <td>3.1</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{Cssxref(":disabled")}}</li>
+</ul>
+</div>