使用font-awesome 在input框中增加一个图标
2017-07-17 12:06
357 查看
比如:
在登录框增加一个用户头像 ,提示用户输入用户名
<html>
<link href="http://libs.baidu.com/fontawesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"/>
<style>
.wrapper { position: relative; }
i.fa { position: absolute; top: 5px; left: 5px; }
.wrapper input { text-indent: 20px;}
</style>
<body>
<div class="wrapper">
<i class="fa fa-user"></i>
<input type="text" placeholder="username ">
</div>
<div class="wrapper">
<i class="fa fa-key"></i>
<input type="text" placeholder="password">
</div>
</body>
</html>
在登录框增加一个用户头像 ,提示用户输入用户名
<html>
<link href="http://libs.baidu.com/fontawesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"/>
<style>
.wrapper { position: relative; }
i.fa { position: absolute; top: 5px; left: 5px; }
.wrapper input { text-indent: 20px;}
</style>
<body>
<div class="wrapper">
<i class="fa fa-user"></i>
<input type="text" placeholder="username ">
</div>
<div class="wrapper">
<i class="fa fa-key"></i>
<input type="text" placeholder="password">
</div>
</body>
</html>
相关文章推荐
- [ExtJS5学习笔记]第五节 使用fontawesome给你的extjs5应用增加字体图标
- [ExtJS5学习笔记]第五节 使用fontawesome给你的extjs5应用增加字体图标
- [ExtJS5学习笔记]第五节 使用fontawesome给你的extjs5应用增加字体图标
- 在web.config文件中,增加“type="APP.Modules.CommandModule,CommandModules"”节点会导致awesome font字体图标显示为方框框
- 使用font-awesome小图标
- 第八十四节,css布局小技巧及font-awesome图标使用
- bootstrap的两种在input框里面增加一个图标的方式
- RN(react native)入坑指南-05,使用图标字体Fontawesome
- web前端程序猿的福音----使用font-awesome代替icon小图标
- 图标库font-Awesome使用教程
- iconfont字体图标的使用方法--超简单! 我之前因为项目用bootstrap比较多,所以使用font awesome字体图标比较多,后来接触到了iconfont,发现想要的什么图标都有,还可以
- 如何在Axure中使用FontAwesome字体图标
- 在SVG中使用Bootstrap或FontAwesome图标字体
- Android使用Font Awesome显示小图标(二)
- wpf 使用Font-Awesome图标字体
- 微信小程序使用font-awesome图标库
- 如何在photoshop等图像编辑软件中使用Font Awesome字体图标
- 在QT/QML中使用FontAwesome做图标显示
- 如何在PS,AI上直接使用FONTAWESOME图标?
- 如何在PS上直接使用FONTAWESOME图标?