style placeholder input code example
Example 1: css placeholder color
::-webkit-input-placeholder {
color: pink;
}
::-moz-placeholder {
color: pink;
}
:-ms-input-placeholder {
color: pink;
}
:-moz-placeholder {
color: pink;
}
Example 2: css style placeholder
input::-webkit-input-placeholder {
}
input::-ms-input-placeholder {
}
input:-ms-input-placeholder {
}
input::-moz-placeholder {
opacity: 1;
}
input:-moz-placeholder {
opacity: 1;
}
input::placeholder {
}
Example 3: input placeholder css
::placeholder {
color: red;
}
Example 4: css style placeholder
<!DOCTYPE html>
<html lang="en">
<head>
<title>Placeholder - Style</title>
<style>
::placeholder {
color: green;
}
.force-opaque::placeholder {
opacity: 1;
}
</style>
</head>
<body>
<input placeholder="Default opacity..." />
<input placeholder="Full opacity..." class="force-opaque" />
</body>
</html>
Example 5: css style placeholder
::placeholder {
}
:-ms-input-placeholder {
}