CSS3 > Selectors

Read-write selector in CSS3

How to give style to the form elements which are readable and writable in CSS3?


By using read-write selector we can give style to the <form> elements which are readable and writable.

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

<body>
    <form>
        First Name<input type="text" name="txt" />
        <br />
        Last Name<input type="text" name="txt"/>
        <br />
        <br />
       Company Name<input type="text" value="SNIT Funda Service LLP" readonly="readonly" />
    </form>
</body>

In the above code snippet we have given style to the read-write selector, so that read-write selector finds the <input> elements which are readable and writable and applies style to it.

OUTPUT

 Views: 3735 | Post Order: 35



Write for us






Hosting Recommendations