我在我的网站上使用谷歌翻译作为语言转换器,但它显示了令人讨厌的工具提示,称为“原始文本”。我如何禁用此功能以及任何其他更好的想法/工具/api 来执行此操作?
谢谢。 使用的代码是...
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
最佳答案
只需将此 CSS 添加到您的 CSS 文件的顶部:
.goog-tooltip {
display: none !important;
}
.goog-tooltip:hover {
display: none !important;
}
.goog-text-highlight {
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
}
我浪费了 8 个小时来解决这个问题,但现在在这 3 行 CSS 之后它看起来很棒 :-) 你可以在这里看到它的实际效果:SEOgenie - Automated SEO
关于javascript - 如何禁用谷歌翻译原始文本工具提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3234920/