I have a form with a textfield and a textarea and both of them have a placeholder. But the font style of the placeholder is different as compared to the textfield and textarea. Please show me how to keep the same font style.
<form>
<input type="text" placeholder="just for testing the style">
<textarea placeholder="just for testing the style"></textarea>
</form>
You need to set them to the same font family in the CSS:
textarea,
input[type=text] {
font-family:Arial;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.