来自字段的粗体文字:<input />?

时间:2011-03-16 09:50:51

标签: html5 input google-calendar-api font-face

今天,当我在Google上填写我的日历时,我看到该事件的描述是粗体字:

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

是否可以在文本输入字段中呈现自定义文本样式?


谢谢 阿尔曼。

修改 简单搜索我喜欢jquery watermark插件可以做类似的事情。

2 个答案:

答案 0 :(得分:14)

CSS可以在文本输入字段中格式化文本:

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

答案 1 :(得分:2)

试试这个你不需要写css

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