Html 在文本框ex:searchbox上设置背景图像样式的最佳方法是什么
我以前也这么做过,但出于某种原因,我现在正在尝试使用fieldset来显示背景图像,我只能让它在firefox中看起来不错。在文本框中添加背景图像是一个很好的跨浏览器解决方案 我尝试的例子Html 在文本框ex:searchbox上设置背景图像样式的最佳方法是什么,html,css,Html,Css,我以前也这么做过,但出于某种原因,我现在正在尝试使用fieldset来显示背景图像,我只能让它在firefox中看起来不错。在文本框中添加背景图像是一个很好的跨浏览器解决方案 我尝试的例子 <div class="subscribe"> <form method="get" id="searcform" action=""> <fieldset class="search">
<div class="subscribe">
<form method="get" id="searcform" action="">
<fieldset class="search">
<input type="text" class="box" value="Subscribe to Email Newsletter" />
<button class="btn" title="Subscribe">Subscribe</button>
</fieldset>
</form>
</div>
订阅
我不确定您确切的意思是什么,但以下内容应该有效:
input[type=text],
textarea {
background: #fff url(path/to/image.png) 0 0 no-repeat;
}
只需使您的输入透明并放置在容器div中即可 例如:
跨浏览器友好。而“文本框”的意思是
或
。?我的意思是,我使用的是我设置圆形输入图像作为背景的地方@josh:请编辑问题的进一步细节,如果可能,提供当前实现的详细信息。