Home > Web Front-end > HTML Tutorial > input中插入图片_html/css_WEB-ITnose

input中插入图片_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:27:10
Original
1485 people have browsed it

如图,在input文本框中加入图片,但我加入input中插入图片_html/css_WEB-ITnose或input(type为image)有边框,

是要用其他的标签,还是其他问题,求指教


回复讨论(解决方案)

边框不是CSS可以控制么

input {background:url(xxx.jpg) no-repeat x y width height} 其中 xxx为图片文件名  x y位置 width 宽 height高

<!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;}
Copy after login
Copy after login

input {background:url(xxx.jpg) no-repeat x y width height} 其中 xxx为图片文件名 x y位置 width 宽 height高

<!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;}
Copy after login
Copy after login


背景图片这种我也用了,可以得到那种样式,但是js中没有点击背景图片的事件吧,就没法用的。。

边框不是CSS可以控制么


我用了border不行的。。

我知道了,改用标签,就没有边框了,谢谢各位

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template