Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何设计GoogleCSE_Html_Css_Google Custom Search - Fatal编程技术网

Html 如何设计GoogleCSE

Html 如何设计GoogleCSE,html,css,google-custom-search,Html,Css,Google Custom Search,我从谷歌那里得到了这段代码,但我无法设计它的样式,我在我的网站的css中加入了新规则,但它不听取它,并用谷歌的默认值覆盖它,我能用它做什么来让它看起来像我想要的,而不是谷歌如何计划它 这是我的css被忽略了 .cse.gsc-control-cse、.gsc-control-cse{ 背景色:透明; 边界:无; 宽度:280px; }尝试添加您的 .cse .gsc-control-cse, .gsc-control-cse { background-color: transparent;

我从谷歌那里得到了这段代码,但我无法设计它的样式,我在我的网站的css中加入了新规则,但它不听取它,并用谷歌的默认值覆盖它,我能用它做什么来让它看起来像我想要的,而不是谷歌如何计划它

这是我的css被忽略了

.cse.gsc-control-cse、.gsc-control-cse{
背景色:透明;
边界:无;
宽度:280px;

}
尝试添加您的

.cse .gsc-control-cse, .gsc-control-cse {
  background-color: transparent;
  border: none;
  width: 280px;
}
样式在google的css之后

e、 g.您的html可能如下所示:

<link rel="stylesheet" href="https://cloud.google.com/compute/style.css" type="text/css">
<link rel="stylesheet" href="style/page.css" type="text/css">

!重要信息
css声明用于覆盖应用于同一元素的其他样式。
此处的更多信息:

您是否尝试将“!important”添加到您的属性?我尝试过,但没有任何帮助。好的,谢谢!我做错了我把边界:没有!重要而非边界:无!重要的;好问题,因为我在谷歌文档中找不到任何关于这方面的信息。回答不好,因为我们绝对不想这样做。因为应该有另一种方法来做到这一点。使用
!重要提示
不是一个好主意。你可以在网上找到很多关于这个事实的信息。这里是一个很好的总结:点采取,有更新我的答案。谢谢@MrUpsidown
.cse .gsc-control-cse, .gsc-control-cse {
  background-color: transparent !important;
  border: none !important;
  width: 280px !important;
}