Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> input { margin-bottom: 10px; border: 1px solid #ddd; padding: 5px; } input:-moz-read-only { background-color: #ccc; } input:read-only { background-color: #ccc; } #read-write:read-write { background: lightgreen; } </style> </head> <body> <h2>:read-write selector example</h2> <form> <div> <label for="read-write">Example1</label> <input value="read-write input" id="read-write"> </div> <div> <label for="read-only">Example2</label> <input readonly value="read-only input" id="read-only"> </div> </form> </body> </html>