如何从特定语言的下拉列表中删除 "powered by google translate" 并由 google 翻译器翻译网页
How to remove the "powered by google translate" and translate web page by google translator from the dropdown of specific languages
我想删除 "powered by google translate" 在 header 和下拉菜单底部
我只需要特定的语言下拉列表
代码
<!DOCTYPE html>
<html lang="en-US">
<body>
<h1>My Web Page</h1>
<p>Hello everybody!</p>
<p>Translate this page:</p>
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
}
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<p>You can translate the content of this page by selecting a language in the select box.</p>
</body>
</html>
您可以在 CSS
文件中添加这些代码行:
body {
top: 0px !important;
}
.goog-logo-link {
display:none !important;
}
.goog-te-gadget {
color: transparent !important;
}
.goog-te-banner-frame.skiptranslate {
display: none !important;
}
我想删除 "powered by google translate" 在 header 和下拉菜单底部
我只需要特定的语言下拉列表
代码
<!DOCTYPE html>
<html lang="en-US">
<body>
<h1>My Web Page</h1>
<p>Hello everybody!</p>
<p>Translate this page:</p>
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
}
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<p>You can translate the content of this page by selecting a language in the select box.</p>
</body>
</html>
您可以在 CSS
文件中添加这些代码行:
body {
top: 0px !important;
}
.goog-logo-link {
display:none !important;
}
.goog-te-gadget {
color: transparent !important;
}
.goog-te-banner-frame.skiptranslate {
display: none !important;
}