发件人字段中的粗体文本:<input>?

问题描述 投票:0回答:3

今天,当我在谷歌填写日历时,我看到活动的描述是粗体的:

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

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


谢谢 阿曼。

编辑 简单搜索我喜欢jquery水印插件可以做类似的事情。

html input google-calendar-api font-face
3个回答
25
投票

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

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

7
投票

试试这个,你不需要写CSS

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

0
投票

使用 Bootstrap 5.0,您可以使用“fw-bold”

© www.soinside.com 2019 - 2024. All rights reserved.