EN
CSS - style only editable input HTML elements
0
points
In this article, we would like to show you how to style only editable input HTML elements using CSS.
Quick solution:
input:read-write {
background: yellow;
}
Practical example
In this example, we present how to use :read-write pseudo class to style only editable HTML input elements.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<head>
<style>
input:read-write {
background: #ffe973;
}
</style>
</head>
<body>
<input type="text" placeholder="e-mail" disabled />
<input type="text" placeholder="username" readonly />
<input type="password" placeholder="password" />
</body>
</html>