问题
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 .
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 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>
Thanks for answer
回答1:
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;}
来源:https://stackoverflow.com/questions/38811427/how-to-disable-pop-up-google-translation-with-html-css