Html from 字段中的粗体文本:<input>?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5323508/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bold text in the from field: <input>?
提问by Arman
Today when I filled my calendar at google I saw that the description of the event is in bold font:
今天,当我在 google 填写日历时,我看到活动的描述是粗体的:
<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.
谢谢阿尔曼。
EDITSimple search I fond that the jquery watermarkplugin can do similar thing.
编辑简单搜索我喜欢 jquery 水印插件可以做类似的事情。
回答by tomasBULL
CSS can format text in text input field:
CSS 可以格式化文本输入字段中的文本:
<html>
<head>
<style type="text/css">
input {font-weight:bold;}
</style>
</head>
<body>
<input type="text"/>
</body>
</html>
回答by kartheek
try this you don't need to write css
试试这个你不需要写css
<input type="text" style="font-weight: bold;">