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

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

WBOY
WBOYOriginal
2016-06-24 12:05:492498browse


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

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn