简体   繁体   中英

Placeholder font style is coming as different for textfield and textarea

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 mention font family for textarea like here

css

textarea{font-family:arial;}

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM