简体   繁体   English

如何从谷歌翻译api中删除或隐藏谷歌图标?

[英]How to remove or hide the google icon from the google translate api?

I am using this line of code: 我正在使用这行代码:

    <div id="google_translate_element"></div>
<script>
   function googleTranslateElementInit() {
      var translator = new google.translate.TranslateElement({
      pageLanguage: 'en',
      autoDisplay: false,
      multilanguagePage: false,
      layout: google.translate.TranslateElement.InlineLayout.SIMPLE
   }, 'google_translate_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Here is the output and I want to remove the icon, how can possibly remove it? 这是输出,我想删除图标,怎么可能删除它? or hide 或隐藏

在此输入图像描述

Used to this 习惯了

.goog-te-gadget-icon{
background:none !important;
}

Live Demo 现场演示

This is much better than rohit's answer 这比rohit的回答要好得多

.goog-te-gadget-icon{
  display:none;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM