Bold text in the from field: <input>?

家住魔仙堡 提交于 2019-12-14 03:47:52

问题


Today when I filled my calendar at google I saw that the description of the event is in bold font:

<input id=":g" name=":g" type="text" class="textinput" dir="ltr">

Is it possible to render the custom text style in the text input field?


Thanks Arman.

EDIT Simple search I fond that the jquery watermark plugin can do similar thing.


回答1:


CSS can format text in text input field:

<html>
<head>
<style type="text/css">
   input {font-weight:bold;}
</style>
</head>
<body>
   <input type="text"/>
</body>
</html>



回答2:


try this you don't need to write css

 <input type="text" style="font-weight: bold;">


来源:https://stackoverflow.com/questions/5323508/bold-text-in-the-from-field-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!