搜索字段内的图像按钮?

时间:2010-04-01 00:51:41

标签: css button textfield

我想知道像bing.com或wolframalpha.com这样的网站如何在文本字段内创建搜索按钮?如果你去每个网站,你可以清楚地看到我的意思。

4 个答案:

答案 0 :(得分:1)

简单:提交按钮(透明背景)位于输入字段上方..:)

答案 1 :(得分:1)

将自己的Firebug作为Firefox的插件。您可以单击屏幕上的元素并查看其CSS。它会教你加载有关CSS的信息。他们实际上使用负余量让那个吸盘在Bing.com上漂浮。

http://getfirebug.com/

答案 2 :(得分:0)

如何根据此搜索框背景图片创意进行格式化?

http://zenverse.net/create-a-fancy-search-box-using-css/

答案 3 :(得分:-1)

@dscher -

这是代码,它在Opera中运行良好,但没有其他浏览器。

submit_form {

background:transparent url(submit.png) no-repeat;
border:0 none;
width:16px;
height:16px;
overflow:hidden;
font-size:0px;
text-decoration:none;
cursor: pointer;
margin-top: 0px;
margin-left: -25px;
margin-right: 0px;
margin-bottom: 0px;
padding-top: 25px;
padding-left: 0px;
padding-right: 0px;
padding-bottom: 0px;

}