覆盖Google自定义搜索CSS [英] Override the google custom search css

查看:95
本文介绍了覆盖Google自定义搜索CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上有Google自定义搜索.我的搜索结果的字体有问题.我需要 Arial,sans-serif .

In my site have google custom search. I have an issue with the font of the search result. I need Arial,sans-serif .

这是我的Google搜索代码.

Here is my google search code.

<div id="cse-search-results"></div>
<script type="text/javascript">
  var googleSearchIframeName = "cse-search-results";
  var googleSearchFormName = "cse-search-box";
  var googleSearchFrameWidth = 600;
  var googleSearchDomain = "www.google.com";
  var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>

这是我的css来自Google.

Here is my css comes from google.

.gsc-control-cse .gsc-table-result {
    font-family: font;
}
.gsc-control-cse, .gsc-control-cse .gsc-table-result {
    font-family: Arial,sans-serif;
    font-size: 13px;
}

.gsc-control-cse .gsc-table-result此类覆盖了下一级的字体系列.

.gsc-control-cse .gsc-table-result this class was override the font-family of below class.

帮我解决这个问题.

推荐答案

我没有研究CSS,但是我认为您正在遵循一个非常古老的示例. Google现在有一个可自定义的搜索引擎创建者,您可以在其中创建每个元素所需的颜色和字体

I haven't looked into CSS, but I think you are following a very old example. Google now have a customizable search engine creator, in which you can specify which color and font you wanted for each element

请参见

此外,您还可以使用上下文XML文件在代码中定义此文件,有关详细信息,请参见外观"部分

Also, you can define this in code by using a context XML file, the detail of which is available in the Look and Feel section

这篇关于覆盖Google自定义搜索CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆