最新消息:

前端第1款:搜索带背景

前端模块 杨红伟 4559浏览 0评论

简介:当我们做搜索时,经常会看到带有搜索按钮的背景,这里我做成了模块,以后用的时候,直接复制过来就可以用了。

 

HTML代码:

<div class="head02" id="">
    <table class="">
        <form name="formsearch" action="#"></form>
        <input name="kwtype" value="0" type="hidden">
        <tr>
            <td><input name="q" class="search-keyword" id="search-keyword" value="" onfocus="if(this.value=='站内搜索...'){this.value='';}" onblur="if(this.value==''){this.value='站内搜索...';}" type="text"></td>
            <td><img alt="提交" src="images/search.gif" width="64" height="30" onclick="document.formsearch.submit();" class="searchimg"></td>
        </tr>
    </table>
</div>

CSS代码:

.head02{float:left;width:308px;height:36px;background: url("../images/search.jpg") no-repeat transparent; overflow:hidden; }
.search-keyword{height:24px; line-height:24px; border:0px solid; width:225px;margin-left:2px;color:#cbcbcb;padding-left:10px;}
.searchimg{cursor:pointer;}

这里用到的图片,请下载案例进行复制吧。


Warning: Use of undefined constant PRC - assumed 'PRC' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.ijquery.cn/wp-content/themes/d8-3.0/comments.php on line 17
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址