Google Custom Search with transparent background

蓝咒 提交于 2019-12-11 02:53:38

问题


I am embedding a custom google search into my blogger site using layout -> add a gadget -> html/javascript.

However, the search box has a white background. How can I make the background transparent?

As you can see in the last screenshot, there is no option for the background color of the search box. Is there any other way to make it transparent?


回答1:


Miscommunication! U so-called professional should simply say, "Refer to Google Custom Search & click CSS source file."

Search for 'background-color' Then change: background-color: transparent;

That's the answer!




回答2:


This is not specific to Blogger, but works on a regular non-Blogger web page. Simply add the following to the head section of your page:

<style>
    .cse .gsc-control-cse,
    .gsc-control-cse {
      background-color:transparent !important;
    }
</style>

You can also take a look at the full CSS page of Google's default styles that can be overridden here. When you override any particular style, be sure to use the !important attribute, as shown above.



来源:https://stackoverflow.com/questions/29942538/google-custom-search-with-transparent-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!