To style each enabled element, use CSS's :enabled selector.
You can try running the following code to style the enabled elements
Online demo
<!DOCTYPE html> <html> <head> <style> input:enabled { background: blue; } </style> </head> <body> <form action = ""> Subject <input type = "text" name = "subject"><br> Student: <input type = "text" name = "student"><br> Age: <input type = "number" name = "age" disabled><br> </form> </body> </html>
The above is the detailed content of Styling each enabled element using CSS. For more information, please follow other related articles on the PHP Chinese website!