如图,在input文本框中加入图片,但我加入

或input(type为image)有边框,
是要用其他的标签,还是其他问题,求指教
回复讨论(解决方案)
边框不是CSS可以控制么
input {background:url(xxx.jpg) no-repeat x y width height} 其中 xxx为图片文件名 x y位置 width 宽 height高
1 | <!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><title>在Input输入框中加入小图标</title><style>input{BACKGROUND-IMAGE: url(/jscss/demoimg/ico080426_dot.gif); BACKGROUND-REPEAT: no-repeat;}
|
Copier après la connexion
Copier après la connexion
input {background:url(xxx.jpg) no-repeat x y width height} 其中 xxx为图片文件名 x y位置 width 宽 height高
1 | <!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><title>在Input输入框中加入小图标</title><style>input{BACKGROUND-IMAGE: url(/jscss/demoimg/ico080426_dot.gif); BACKGROUND-REPEAT: no-repeat;}
|
Copier après la connexion
Copier après la connexion
背景图片这种我也用了,可以得到那种样式,但是js中没有点击背景图片的事件吧,就没法用的。。
边框不是CSS可以控制么
我用了border不行的。。
我知道了,改用标签,就没有边框了,谢谢各位