IE8 字体大小切换为 :hover - 仅限日语
我有一个多语言页面,但仅对日语版本有问题。
由于某些原因,在 IE8 中,当我将鼠标悬停在某个元素上时,同级元素的字体大小将会增加/减小。
更奇怪的是,这种情况并不是每次悬停都会发生,有时我无法立即重现,我需要继续将鼠标悬停在页面同一区域的不同元素上。最终这个错误将露出它丑陋的头。
这个bug只出现在日语页面,其他语言似乎都没问题。
这可能会发生在其他版本的 Internet Explorer 上,我尚未在所有版本上进行测试。
澄清一下,我没有对任何 :hover 规则进行任何字体大小更改。
I have a page that is multi lingual and I have an issue with the Japanese version only.
For some reason in IE8, when I hover over an element, a sibling's font-size will increase/decrease.
Even stranger, is that this doesn't happen on every hover, sometimes I cannot reproduce straight away, I need to keep hovering over different elements in the same area of the page. Eventually this bug will rear its ugly head.
This bug only occurs on the Japanese page, all other languages seem to be fine.
This could be happening on other versions of Internet explorer, I haven't tested on all.
To clarify, I have not got any font-size changes on any :hover rules.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在一家日本网站工作,最近遇到了这个问题。在花费了超出合理时间的时间后,我从这些详细的日语文章中找到了答案:
顶部链接包含处理它的方法。对于那些看不懂日语的人,我将总结一下:
该问题仅影响 IE8 显示使用
MS P Gothic
字体(通常是 Windows 上的默认日语字体)且字体大小在 9px 之间的页面和 11 像素。与许多 IE bug 不同,它与浮动/边距/行高/等无关。正如 Oldie 指出的那样,该错误并不一致,有时会立即发生,有时需要悬停几次,而且似乎会随机放大/缩小文本。三个主要解决方案如下:
MS Gothic
或使用font-family
样式的其他日语字体。9px
~11px
范围之外的任何内容(在默认 IE8 字体设置下,1em
大小的文本不会受到影响,但稍小的文本(例如,0.8em
)将会受到影响)。< /code>
我选择了 #2,因为
MS Gothic
与所有其他MS P Gothic
文本相比看起来很不和谐,并且觉得 #3 对我们的网站有明显的缺点。这不是一个理想的解决方案,但它确实有效。祝你好运。
I work for a Japanese site and recently came across this issue. After spending more time than was reasonable, I found the answer from these detailed write-ups in Japanese:
The top link includes the ways to deal with it. For those who can't read Japanese I will summarize:
The problem only affects IE8 showing pages using the
MS P Gothic
font (generally the default Japanese font on Windows) at a font-size that is between 9px and 11px. Unlike many IE bugs, it has nothing to do with floats/margins/line-height/etc. As Oldie has pointed out, the bug is not consistent, sometimes it happens right away and sometimes it takes a few hovers, and it seems to enlarge/shrink the text randomly.The three primary solutions are as follows:
MS Gothic
or some other Japanese font usingfont-family
style.9px
~11px
range (Under the default IE8 font settings,1em
sized text will not be affected, but slightly smaller text (eg,0.8em
) will be affected).<meta http-equiv="X-UA-Compatible" content="IE=7" />
I went with #2 because
MS Gothic
looked jarring next to all the otherMS P Gothic
text, and felt #3 had clear disadvantages for our site.It's not an ideal solution, but it works. Best of luck.