We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

This translation is incomplete. Please help translate this article from English.

La pseudo-class CSS :read-write representa un element (com ara una entrada de text) que l'usuari pot editar.

/* Selecciona qualsevol element <input> que sigui editable Compatible amb Firefox amb un prefix */
input:-moz-read-write {
  background-color: #bbf;

/* Compatible amb Blink / WebKit / Edge sense un prefix */
input:read-write {
  background-color: #bbf;

Nota: Aquest selector no només selecciona el text <input> s; seleccionarà qualsevol element que l'usuari pugui editar, com ara un element <p> amb contenteditable establert en ell.





<input type="text" value="Type whatever you want here.">
<input type="text" value="This is a read-only field." readonly>
<p>This is a normal paragraph.</p>
<p contenteditable="true">You can edit this paragraph!</p>


input { min-width: 25em; }
input:-moz-read-write { background: cyan; }
input:read-write { background: cyan; }

p:-moz-read-write { background: lightgray; }
p:read-write { background: lightgray; }
p[contenteditable="true"] { color: blue; }



Especificació Estat Comentari
HTML Living Standard
The definition of ':read-write' in that specification.
Living Standard Sense canvis.
The definition of ':read-write' in that specification.
Recommendation Defineix la semàntica respecte a HTML i la validació de restriccions.
Selectors Level 4
The definition of ':read-write' in that specification.
Working Draft Defineix la pseudo-classe, però no la semàntica associada.

Navegadors compatibles

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Característica Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic (Yes) (Yes) (Yes)-mozerrada 312971 Nightly build [1] (Yes) (Yes)
Element editable (excepte per als camps de text d'entrada) No support No support (Yes)-mozerrada 312971 No support No support No support
Característica Android Chrome for Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic ? (Yes) (Yes) (Yes)-mozerrada 312971 ? ? ?
Element editable (excepte per als camps de text d'entrada) No support No support No support (Yes)-mozerrada 312971 No support No support No support

[1]: Estat de la plataforma MS Edge: Windows Insider Preview Build 10547+

Vegeu també

Document Tags and Contributors

Contributors to this page: Legioinvicta
Last updated by: Legioinvicta,