Home > Web Front-end > HTML Tutorial > IE cannot adjust the font size that uses px as the unit_html/css_WEB-ITnose

IE cannot adjust the font size that uses px as the unit_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:51:28
Original
1694 people have browsed it

When we design web pages, we usually use px to define fonts. This will bring about a problem, that is, we cannot use the browser font amplification function, and we found out when browsing some foreign websites The reason why you can use the browser font amplification function is as follows:

1. IE cannot adjust the font size that uses px as the unit;
2. The reason why most foreign websites can adjust it is that they use Em is used as the font unit;
3. Firefox can adjust px and em, but more than 96% of Chinese netizens use IE browser (or IE-based browser).

px pixel (Pixel), a relative length unit, which is relative to the monitor screen resolution.

em is also a relative length unit, relative to the font size of the text within the current object. If the current font size for inline text has not been manually set, it will be relative to the browser's default font size.


I said that there is no difference between em and px. Px can also be adjusted with the page size. . . . .
Is ie9 updated? Or what?,,,,,,,,,


Reply to discussion (solution)


Doesn’t anyone care about this problem?

Bonus points, this is all my points,

You need to open the menu bar first, select View - Text Size in the menu, and you will see the effect

If you adjust it through "View" - "Zoom", it will change. When you adjust it through "View" - "Font Size", the em will change, but the px will not change.

<!doctype html><html lang="en"> <head>  <meta charset="UTF-8">  <meta name="Generator" content="EditPlus&reg;">  <meta name="Author" content="">  <meta name="Keywords" content="">  <meta name="Description" content="">  <title>Document</title>  <style type="text/css">	body{		/*font-size:20px;*//*写成这样就不能通过字体大小来调整了*/		font-size:200%;/*这样写的可以调整*/	}  </style> </head> <body>  <div style="font-size:32px;">	中华人民共和国(不会变大小)  </div>  <div style="font-size:2em;">	中华人民共和国(可以调整大小)  </div>  <div style="font-size:1.2em;">	中华人民共和国(可以调整大小)  </div>	 </body></html>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template