如何在H5的palceholder中设置一个图标?
使用FontAwesome可以很方便的实现 :
<input type="text" placeholder=" 搜索" style="font-family:Arial, FontAwesome" />
其中: 为FontAwesome的字体编码,FontAwesome字体和字体编码可以从下面地址获得:
图标字体页面:
http://fontawesome.io/icons/
图标字体对应的十六进制编码页面:
http://fontawesome.io/cheatsheet/