日期:2014-05-16  浏览次数:20660 次

登陆界面输入框内加入小图标的样式怎么写?

在登陆界面的输入框左边加一个小图标,如图,css样式应该怎么写?
------解决方案--------------------
如下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
.text{border:solid 2px #ccc;width:400px;height:40px;background:url(http://d.lanrentuku.com/down/png/1211/blueberry/user_friend.png) no-repeat 0 center;}
.text input{float:left;border:none;background:none;height:40px;line-height:30px;width:100%; text-indent:32px;}

</style>
</head>

<body>
<div class="text">
<input type="text"/>
</div>
</body>
</html>