就是把链接块级化,设置大小,然后设置背景图片,自然整张图都可链接
@.....这个咋个说呢,虽然很简单……就拿verycd那搜索框做例吧……,自己写了个……
HTML:
<div id="top-search">
<input type="text" id="top-search-input" name="kw" value="" />
<input type="submit" id="top-search-lib" class="top-search-button" value="资源" />
<input type="button" id="top-search-site" class="top-search-button" value="高级搜索" />
<input type="button" id="top-search-advance" class="top-search-button" value="发布资源"
/></div>
CSS:
#top-search{width:750pxheight:34pxbackground:url(search.jpg) no-repeat}/*背景*/
#top-search input{float:leftwidth:70pxheight:30pxmargin-top:5pxbackground:noneborder:none}/*整体input设置*/
#top-search #top-search-input{width:408pxheight:12pxmargin:12px 35px 5px 27px}/*调整输入框*/
#top-search-lib,#top-search-site,#top-search-advance{text-indent:-999pxoverflow:hiddencursor:pointer}/*其它三个按钮,隐藏字体*/
图片就用下面这张:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)