有没有人知道如何在Bootstrap4输入中使用FontAwesome5图标作为占位符?我已经看过以前版本的几种解决方案,但似乎都没有与最新版本一起使用。这是我到目前为止所得到的:
<input
type="text"
className="form-control"
placeholder=" Search"
style={{
fontFamily: 'FontAwesome, "Open Sans", Verdana, sans-serif',
fontStyle: 'normal',
fontWeight: 'normal',
textDecoration: 'inherit'
}}
/>
答案 0 :(得分:0)
您无法添加图标和文字。 你可以尝试这个。
<input
type="text"
class="form-control"
placeholder=""
style="
fontFamily:FontAwesome;
fontStyle: normal;
fontWeight: normal;
textDecoration: inherit;
"
/>
答案 1 :(得分:0)
input{
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-decoration: inherit;
}
&#13;
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<input type="text" placeholder=""/>
&#13;
答案 2 :(得分:0)
for a in l:
score=0
for b in range(0,length):
if a[b]==t[b]: <--------- #here you say the b'th value of the integer a
您应该在占位符中写上图标代码