翻译此弹出窗口涵盖内容
我正在使用翻译此服务在我的网站上进行翻译。一切都很好,但有一件事。当您翻译该网站时,会出现一个下拉栏,上面写着
页面已完成翻译。翻译者:
翻译此按钮 |撤消翻译>
这也很好,但问题是该栏掩盖了我网站上的内容。有没有办法以某种形式更改脚本,将内容推下而不是覆盖?我在翻译设置中看不到一种方法来做到这一点,但我想知道是否有人可以帮助我弄清楚如何在那里进行硬编码。我对 javascript 的了解不够,无法自己完成此操作。
感谢您的任何帮助!
这里是一个简短的视频,用于展示我所说的内容被掩盖的含义。
这是我的网站上使用的翻译此代码:
<!-- Begin TranslateThis Button -->
<div id="translate-this"><a href="http://translateth.is/"
class="translate-this-button">Translate</a></div>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js">
</script>
<script type="text/javascript">
TranslateThis({
GA : true,
doneText : 'Page Finished Translating. Translated by the',
undoText : 'Undo Translation »',
undoLength : 15000,
fromLang : 'en',
ddLangs : [
'es',
'fr',
'en',
'ar',
'zh-CN',
'ko',
'it',
'cs',
'iw',
'de',
'pt-PT',
'ru',
'ja',
'vi',
'el',
'hi',
'nl',
'tr'
],
btnImg : '/images/skin/translate-button.png',
btnWidth : 120,
btnHeight : 18,
});
</script>
<!-- End TranslateThis Button -->
感谢任何人提供的任何帮助!
I am using the Translate This service for translation on my site. Everything works great but for one thing. When you translate the site a bar drops down that says
Page Finished Translating. Translated by the
TranslateThis Button | Undo Translation >
That is also fine but the issue is that the bar covers up content on my site. Is there a way to change the script in some form that will push the content down instead of covering it up? I do not see a way to do this in the settings of translate this but I was wondering if someone might help me figure out how to hard code that in there. I do not know enough about javascript to do this myself.
Thanks for any and all help!
Here is a short video to show what I mean by content being covered up.
Here is the Translate This code used on my site:
<!-- Begin TranslateThis Button -->
<div id="translate-this"><a href="http://translateth.is/"
class="translate-this-button">Translate</a></div>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js">
</script>
<script type="text/javascript">
TranslateThis({
GA : true,
doneText : 'Page Finished Translating. Translated by the',
undoText : 'Undo Translation »',
undoLength : 15000,
fromLang : 'en',
ddLangs : [
'es',
'fr',
'en',
'ar',
'zh-CN',
'ko',
'it',
'cs',
'iw',
'de',
'pt-PT',
'ru',
'ja',
'vi',
'el',
'hi',
'nl',
'tr'
],
btnImg : '/images/skin/translate-button.png',
btnWidth : 120,
btnHeight : 18,
});
</script>
<!-- End TranslateThis Button -->
Thanks for any help anyone can offer!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
弹出窗口是一个动态创建的 div,带有
ttb-undo
类。它由 TranslateThis 脚本包含的 CSS 文件绝对定位。最简单的解决方案是完全隐藏该栏:您还可以尝试更改其在 CSS 表中的位置和顶部值,但由于它以编程方式缩小,我不确定您可能会遇到什么样的抖动。当我在 Firebug 中手动删除
top: 0
规则并添加bottom: 0
时,那东西随着缩小而跳舞。The popup is a dynamically created div with class
ttb-undo
. It is absolutely positioned by a CSS file which is included by the TranslateThis script. The easiest solution is to just hide the bar entirely:You could also try changing its position and top values in a CSS sheet, but since it's shrunk programmatically, I'm not sure what kind of jittering you might get. When I manually deleted the
top: 0
rule and added abottom: 0
in Firebug, the thing danced as it was shrinking.