gpt4 book ai didi

css - 使用谷歌翻译后更改字体大小

转载 作者:太空宇宙 更新时间:2023-11-03 18:46:36 25 4
gpt4 key购买 nike

我正在使用 WordPress主题,我已经安装了 Google翻译插件。

翻译语言后我遇到了问题。从英文改成任何语言后,字体完全变大了。我已经研究并发现我可以使用 :lang pseudo标签,但是当我用 Firebug 检查时 html我页面的类别仍然是“en-US”,:lang pseudo 也是如此标签工作?

如果是这样,当我将其切换为法语时,我如何知道该调用什么?我已经对此进行了几个小时的研究,但尚未找到解决方案。这是网站的链接,如果有任何帮助,我们将不胜感激

http://rightbrainmediaanddesign.com/wordpress_jinja/

///美国东部时间凌晨 1:09 更新///我发现翻译后它把我的文字包装在 <font> 中标签,所以如果我在 css 中调用它,它允许我对任何翻译进行通用更改,但是我仍然无法针对特定语言。这是我所做的。 #primary-menu font {
font-size: 11px !important;
}
现在成功了,但正如我所说,它对任何翻译都是通用的,即从英语到任何语言。现在的挑战是能够仅更改法语或仅更改西类牙语。

最佳答案

(在问题编辑中回答。转换为社区维基答案。参见 What is the appropriate action when the answer to a question is added to the question itself?)

OP 写道:

Okay, ISSUE SOLVED!! I downloaded a different wordpress plugin here it is.

http://transposh.org/

Now this plugin ties into the Google Translate API, however unlike the google plugin this one actually changes the lang="" in the <html> section above the header. So, in your css, to reference a specific language in the css it would look like this(for those that dont know) html:lang(es) That would be for spanish, to reference a specific div it would look like html:lang(es) #primary-menu {}. To locate your language abbreviation, just inspect your document and you will see it located at the very top of the html in this case it says lang="es". I sure hope this helps someone out there, because it just did wonders for me.

关于css - 使用谷歌翻译后更改字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16227936/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com