首页  >  文章  >  web前端  >  登陆界面输入框内加入小图标的样式怎么写?_html/css_WEB-ITnose

登陆界面输入框内加入小图标的样式怎么写?_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 12:05:492498浏览


在登陆界面的输入框左边加一个小图标,如图,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>

正是我要的效果,很感谢!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn