In this post we will see how to add font awesome in input placeholder,The only way to font awesome icon in placeholder is hex code of icon and then After you add the hex code to placeholder you need to add
Font Awesome
to the font-family
for the specified CSS class (form-control
in this example).
<html>
<head>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<style>
.form-control {
font-family: "FontAwesome"
}
font-family: "FontAwesome"
}
</style> </head>
<body>
<input type="text" class="form-control" placeholder="">
</html>
</body>
<body>
<input type="text" class="form-control" placeholder="">
</html>
</body>
No comments:
Post a Comment