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:
xxxxxxxxxx
1
input:read-write {
2
background: yellow;
3
}
In this example, we present how to use :read-write
pseudo class to style only editable HTML input elements.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
input:read-write {
7
background: #ffe973;
8
}
9
10
</style>
11
</head>
12
<body>
13
<input type="text" placeholder="e-mail" disabled />
14
<input type="text" placeholder="username" readonly />
15
<input type="password" placeholder="password" />
16
</body>
17
</html>