Can an input field have a different font-family
for its text compared to its placeholder?
I attempted to change the font-family
of an input's placeholder using a pre-defined @font-face
in CSS, but it didn't work:
CSS
.mainLoginInput::-webkit-input-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
.mainLoginInput:-moz-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
HTML
<input class="mainLoginInput" type="text" placeholder="Username" />
Is there a solution to this issue?