input placeholder style 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: placeholder css
::-webkit-input-placeholder {color: pink;}
::-moz-placeholder { color: pink;}
:-ms-input-placeholder { color: pink;}
:-moz-placeholder {color: pink;}
Example 4: input placeholder css
::placeholder {
color: red;
}
Example 5: html css placeholder input font-size
Placeholder text will automatically inherit the font family and font size of the regular input text, but you may be in a situation where you want to change the placeholder text color. You can accomplish that with the ::placeholder pseudo-element.
Example 6: change input placeholder text css
#text2::-webkit-input-placeholder::before {
color:#666;
content:"Line 1\A Line 2\A Line 3\A";
}