我如何在输入字段中添加永久占位符
how do i add permanent place holder inside input filed
我需要在输入字段中添加 font-icon
所以我使用了这个方法
<input type="text" name="your name" placeholder=" YOUR NAME" style="font-family:Flaticon" class="restrict">
如你所见placeholder=" YOUR NAME"
这个
显示font-icon
但我的问题是当用户键入一些文本占位符时消失所以我需要将字体图标永久放置在输入字段中,例如<lable>
谁能帮帮我
你不能。你希望它看起来像什么? placeholder
消失 设计。
如果您希望在您的输入字段前面添加一个图标前缀,请将它们放在一个容器中,为该容器提供所需的样式并将您的图标和您的 input
-标签。就是这样,how bootstrap your problem solves.
简化示例:
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
当然需要CSS.
我需要在输入字段中添加 font-icon
所以我使用了这个方法
<input type="text" name="your name" placeholder=" YOUR NAME" style="font-family:Flaticon" class="restrict">
如你所见placeholder=" YOUR NAME"
这个
显示font-icon
但我的问题是当用户键入一些文本占位符时消失所以我需要将字体图标永久放置在输入字段中,例如<lable>
谁能帮帮我
你不能。你希望它看起来像什么? placeholder
消失 设计。
如果您希望在您的输入字段前面添加一个图标前缀,请将它们放在一个容器中,为该容器提供所需的样式并将您的图标和您的 input
-标签。就是这样,how bootstrap your problem solves.
简化示例:
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
当然需要CSS.