当前位置:软件学习 > Word >>

改变WordPress默认搜索小工具样式

 

鉴于近期Google搜索变得极不稳定,HotNews Pro 主题集成的Google自定义搜索功能,也时常失去作用,无法显示搜索结果,如果你不想彻底关闭Google自定义搜索功能,而全部使用WP自带的简易搜索功能,可以在侧边栏中调用WP默认的搜索小工具,为保持该小工具样式与主题风格保持一致,可以把下面的代码加到主题样式文件style.css中,改变其默认样式。

 

/** 搜索小工具**/  

input#s {   

width:190px;   

height: 22px;   

*margin: 10px 0 0 0;   

*+margin: 10px 0 0 0;   

padding: 1px;   www.zzzyk.com

border:1px solid #ccc    

}   

input#searchsubmit {   

background:url(../images/go.gif) no-repeat;   

width:15px;   

height:15px;   

border:none;   

cursor:pointer;   

text-indent:-10000px;   

}   

.box {   

*height:35px;   

*+height:35px;   

}   

.screen-reader-text {   

display: none;   

}  

 

最终效果如我博客侧边栏的站内搜索。

 

注:使用WP默认小工具,一定要添写小工具的标题,否则会造成模板错位

摘自:zmingcx.com

补充:web前端 , HTML/CSS  ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,