IE8 font-size toggles on :hover - Japanese lang only(IE8 字体大小在 :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.
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:
- http://freesoft.tvbok.com/sonota/ie8-fontsize.html
- http://social.technet.microsoft.com/Forums/ja-JP/internetexplorerja/thread/70d700f4-0bda-48b1-9476-d31993b7cbf4/
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:
- Set the font to
MS Gothic
or some other Japanese font usingfont-family
style. - Change the font size to be anything outside the
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). - Force IE8 to display the page as if it was IE7 by adding the following in the header:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
I went with #2 because MS Gothic
looked jarring next to all the other MS P Gothic
text, and felt #3 had clear disadvantages for our site.
It's not an ideal solution, but it works. Best of luck.
这篇关于IE8 字体大小在 :hover 上切换 - 仅限日语语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:IE8 字体大小在 :hover 上切换 - 仅限日语语言
基础教程推荐
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 我什么时候应该在导入时使用方括号 2022-01-01
- 动态更新多个选择框 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 在for循环中使用setTimeout 2022-01-01
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- 响应更改 div 大小保持纵横比 2022-01-01