html – Google Foundation中的Google自定义搜索显示问题

我正在尝试添加Google自定义搜索,但它仍然显示不正确.按钮上的搜索图标丢失,看起来好像文本框的底部被切断了.

新成员,所以我无法发布图像.

<div id="header">
  <div class="row">
    <div class="four columns">
      <h1><img src="images/QEFlogo.JPG" /></h1>
    </div>
    <div class="four offset-by-two columns">
      <div id="iso" class="hide-for-small">
        <h1>
          <img src="images/ISO9001.jpg" />
          <img src="images/ISO14001.jpg" />
        </h1>
      </div>
      <div id="gcsearch" class="hide-for-small">
        <gcse:searchBox-only></gcse:searchBox-only>
      </div>
    </div>
  </div>
</div>

没有真正的CSS可以说……

#gcsearch {
    width:300px;
    position:relative;
    left:-5px;
}

该脚本不受Google生成代码的影响.

编辑现在发现这是问题所在. Google元素在其服务器上使用CSS文件default.css.这会生成宽度和高度.

在CSS表的第126行,它定义了……

.cse .gsc-search-button input.gsc-search-button-v2,input.gsc-search-button-v2 {
    height: 13px;
    margin-top: 2px;
    min-width: 13px;
    padding: 6px 27px;
    width: 13px;
}

请记住,我没有太多的Javascript知识,为什么会发生这种情况,我该如何解决

我在非基础页面上测试了代码并且它正确呈现.

解决方法

这是Foundation框架的一个问题.将以下内容添加到按钮并解决.所引用的类是由Google生成的,这就是为什么它们不会显示在我上面的代码中.

input.gsc-search-button,input.gsc-search-button:hover,input.gsc-search-button:focus {
background-image: inherit;
Box-sizing: content-Box;
}

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些