Firefox 33 如何隐藏about:newtab中搜索框 CSS

阅读:3699回复:8
2014-11-05 18:33
写私信
楼主#
about:newtab中所谓的沉浸式搜索框个人觉得有点画蛇添足,所以想把它隐藏掉,但是在百度上搜索了有关的CSS代码,大多针对的是Firefox 31。我在Firefox 33中尝试了都无效,不知道是否是个例,谁有在Firefox 33中有效的代码给我一个,谢谢。
2014-11-05 19:21
写私信
1楼#
#newtab-search-container {display:none !important;}
2014-11-05 19:48
写私信
2楼#
alanfly:#newtab-search-container {display:none !important;}回到原帖
这个我试过了,没有效果。不知道是否是个例。
百度上的其他几个代码:


@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("about:newtab")
 {#newtab-search-container {display: none !important;}}
/*====================*/
@-moz-document url(about:newtab) {#newtab-margin-top,#newtab-search-container{display:none!important;}}
另外,老外论坛中的CSS大同小异,不过我试过都没效果,晕……
2014-11-05 20:05
写私信
3楼#
jywj108:这个我试过了,没有效果。不知道是否是个例。
百度上的其他几个代码:


@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("about:newtab"...
回到原帖
不加域名限制有效,要加用下面的。
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
@-moz-document url("about:newtab") {
html|div#newtab-search-container {display:none !important;}
}
2014-11-05 20:22
写私信
4楼#
很遗憾,复制了你的代码,在我电脑上没有成功。不知道是否因为其他原因引起的,比如我在config:about中将原来略缩图行列数由5*3改成了5*2。
2014-11-05 20:33
写私信
5楼#
不加域名限制直接用1楼代码试试。
2014-11-05 20:35
写私信
6楼#
alanfly:不加域名限制直接用1楼代码试试。回到原帖
#newtab-search-container {display:none !important;}
没有效果……奇怪
2014-11-05 20:41
写私信
7楼#
jywj108:#newtab-search-container {display:none !important;}
没有效果……奇怪
回到原帖
不应该阿,用右键自带的元素审查看看搜索框的id,如果不一样就把代码里的id换成本地的。
2014-11-05 20:56
写私信
8楼#
行,我再试试,或者使用dom_inspector看看。
ps:按照你的建议,我在“查看元素”中查看了搜索框的id,确实是newtab-search-container。可能是我的个人FF的原因,自从Firefox更新最新版以来,总是偶尔抽风。