CSS Selector - CSS :read-write








The :read-write selector selects form elements with no "readonly" attribute, and no "disabled" attribute.

Summary

CSS Version
3

CSS Syntax

:read-write {
   style properties 
}

Browser compatibility

:read-write Yes No Yes Yes Yes




Example

<!DOCTYPE html>
<html>
<head>
<style>
input:-moz-read-write { /* For Firefox */
    background-color: red;
}<!--from  w  ww  . j a va  2  s  . c  om-->

input:read-write {
    background-color: red;
}
</style>
</head>
<body>

    <p>A normal input element:<br><input value="hello"></p>
    
    <p>A readonly input element:<br><input readonly value="hello"></p>

</body>
</html>

Click to view the demo