关于wordpress的问题求助

2013-08-14 13:01:59 +08:00
 314x
我用wordpress的主题搭建博客,在IE下浏览正常,但在chrome和firefox下顶部的搜索框默认都有search的字样,如何去掉呢?
2189 次点击
所在节点    问与答
6 条回复
whuhacker
2013-08-14 13:27:40 +08:00
目测应该是 placeholder,贴下搜索框的代码呗
314x
2013-08-14 13:35:17 +08:00
CSS样式里面的代码

#searchform button,#rss a,.icon {background-image:url(images/icon.png); background-repeat:no-repeat;}
.aligncenter {display:block; margin-left:auto; margin-right:auto;}
.alignleft {float:left; display:inline;}
.alignright {float:right; display:inline;}
.post .alignleft,.post .alignnone {margin:0.5em 0.5em 0 0;}
.post .alignright {margin:0.5em 0 0 0.5em;}
.post .aligncenter {margin:0.5em auto;}
/*Header*/
#header {background:#428c85 url(images/blue_bg.png) repeat; border-bottom:1px solid #005b97; box-shadow:0 1px 5px #003f68; width:100%; padding:5% 0; color:#90d5ff; text-shadow:1px 1px #005b97; z-index:1; position:relative;}
#header_box {position:relative;}
#header h1 {font-size:2em; margin-bottom:0.6em;}
#header h1 a {color:#fff; text-decoration:none;}
#header h2 {font-size:1em; font-weight:400; margin-bottom:0;}
/*Toolbar*/
#toolbar {height:24px; font-size:0.8em; position:absolute; right:0; bottom:0;}
#searchform {border:1px solid ##326964; background-color:rgba(50,105,100,.6); border-radius:3px; box-shadow:inset 1px 1px 2px #00558d,0 1px 1px #0088da; padding:3px 5px; height:16px; float:right;}
#searchform label {display:none;}
#searchform input {color:#90d5ff; text-shadow:1px 1px #005b97; border:none; background:none; box-shadow:none; width:150px; height:16px; line-height:16px; vertical-align:top;}
#searchform input:-moz-placeholder {color:#90d5ff;}
#searchform input::-webkit-input-placeholder {color:#90d5ff;}
#searchform button {background-position:-94px 2px; width:16px; height:16px; text-indent:-999px; vertical-align:top; border:none; cursor:pointer; margin-left:-5px; font-size:0;}
#searchform button:hover {background-position:-142px -46px;}
Keinez
2013-08-14 14:53:16 +08:00
这不关css的事情。定位到input标签,把placeholder清空就是。
314x
2013-08-14 15:13:33 +08:00
@Keinez 赞,搞定了!
why
2013-08-14 20:52:15 +08:00
汗,这是IE不正常好不好
cyr1l
2013-08-14 21:58:08 +08:00
@why +1, 这是IE下不正常, Chrome 和 Firefox下正常才对。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/79056

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX