如何禁用使用H​​TML CSS弹出Google翻译 [英] How To Disable Pop Up Google Translation With HTML CSS

查看:224
本文介绍了如何禁用使用H​​TML CSS弹出Google翻译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google窗口小部件在我的网站中进行翻译.但是,当我单击翻译"时,它将向下滚动显示在我的页面顶部"中,并阻止我的菜单导航.

I use Google Widget to Translate in my website . But when I Click Translate it will show pop up in Top my Page and Dissuade my Menu Navigation when scrolled down .

我尝试过使用某些CSS,HTML和JavaScript,但无法修复 单击该如何隐藏从我的菜单导航中弹出的google翻译?

I was tried with some css, html and javascript but it cant fix how to hide google translation pop up from my Menu Navigation when it clicked ?

CSS:

#google_translate_element{width:300px;float:right;text-align:right;display:block}
#goog-gt-tt {dispaly:none;visibility: hidden;}

HTML和JavaScript:

HTML And JavaScript :

<div class="google_translate_element" id="google_translate_element"></div><div 
id="goog-gt-tt" 
class="goog-tooltip skiptranslate"  ></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'id', includedLanguages: 'af,ar,de,en,eo,es,et,fa,fr,id,it,ja,jv,ka,kn,la,mn,ms,ne,nl,pa,ru,so,sr,su,ta,th,tl,tr,uk,vi,zh-CN,zh-TW', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, autoDisplay: false}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

感谢您的回答

推荐答案

最后,我通过查看Inspect Element来找到它.只是把那些都藏起来

Finally I find it by looking in Inspect Element . Just Make those all be Hide

#google_translate_element{width:300px;float:right;text-align:right;display:block}
.goog-te-banner-frame.skiptranslate { display: none !important;} 
body { top: 0px !important; }
#goog-gt-tt{display: none !important; top: 0px !important; } 
.goog-tooltip skiptranslate{display: none !important; top: 0px !important; } 
.activity-root { display: hide !important;} 
.status-message { display: hide !important;}
.started-activity-container { display: hide !important;}

这篇关于如何禁用使用H​​TML CSS弹出Google翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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