In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to solve and avoid line-height failure in ie9 browser". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to solve and avoid line-height failure in ie9 browser" can help you solve the problem.
First, the cause of ie9 line-height failure
Chinese fonts are used in CSS, while Chinese fonts use Chinese characters. Such as:
Font-family: Microsoft Yahei
The CSS font font-family style uses Chinese fonts such as "Song style", "boldface" or "Microsoft Yahi" to be set in CSS with Chinese characters.
It is inevitable to use Chinese fonts in the DIV+CSS layout of web pages, such as boldface, Song style, Microsoft Yahi and other Chinese fonts. How to use these Chinese font styles correctly? Next, let's learn how to solve the problem of using these Chinese fonts, which is compatible with IE9 and supports IE9 to use Chinese fonts.
Second, the method to solve the problem of non-vertical centering of ie9 font
1. Convert Chinese fonts into Unicode codes.
The corresponding Unicode of "boldface" is "\ 9ED1\ 4F53".
The corresponding Unicode of "Song style" is "\ 5B8B\ 4F53".
The corresponding Unicode code of "imitating Song" is "\ 4EFF\ 5B8B".
The corresponding Unicode code of "Microsoft Acer" is "\ 5FAE\ 8F6F\ 96C5\ 9ED1".
The conversion of Chinese characters to Unicode-encoded characters not only successfully sets the corresponding font, but also supports vertical centered line-height style in IE9 browsers.
Practical application of exp:
.div {font-family: "Microsoft Yahi"}
After conversion to Unicode coding
.div {font-family: "\ 5FAE\ 8F6F\ 96C5\ 9ED1"}
After the Chinese character font is converted to Unicode coding, the font effect is the same, unaffected, and compatible with all major browsers.
What if I can't remember the Unicode coding table?
Among the commonly used css fonts in CSS+DIV layout, the Chinese fonts are boldface, Song style, imitation Song, and Microsoft Yahei. If you can't remember, you can enter the css Unicode coding table to view it and copy it.
2. Use English names for Chinese fonts and Chinese characters
The Chinese font set by CSS in the CSS+DIV layout is converted into the corresponding English name font. After conversion, the effect of setting the Chinese font is unchanged, and it is compatible with all major browsers.
"boldface" corresponds to the English name "SimHei".
The corresponding name of "Song style" is "SimSun".
"imitating Song" corresponds to the English name "FangSong".
"Microsoft Acer" corresponds to the English name "Microsoft YaHei".
Practical application of exp:
.div {font-family: "Microsoft Yahi"}
After converting to an English name
.div {font-family: "Microsoft YaHei"}
The css font in div css layout is converted from Chinese character font to English name font, the font setting effect will not be affected, and it is compatible with all major browsers, you can rest assured to use it.
This is the end of the content on "how to solve and avoid line-height failure in ie9 browsers". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.