Home > Web Front-end > HTML Tutorial > font-size : 100%_html/css_WEB-ITnose

font-size : 100%_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:23:46
Original
1148 people have browsed it

1. font-size: Does 100% represent 16px? How many em does it represent?

2. If I use a fluid layout, do all px have to be converted to em?


Reply to the discussion (solution)

1. font -size: Does 100% mean 16px? How many em does it mean?

2. If I use a fluid layout, do all px have to be converted to em?

1. em refers to the browser’s default font size, which is a lot if the user does not customize it The browser is set to 16px, but I’m not sure when it will be customized.

2. This is almost the meaning. The fluid layout believes that em can adapt to screen changes in size better than px, while maintaining a relatively unchanged proportion. Another idea is to use percentages for responsive layout. Of course em and percentage can be mixed.

3. Another new point of view is that the zoom function of the webkit kernel makes em unnecessary. The user can change it at any time, just use the percentage directly.

If you are lazy, you can use a ready-made framework. It is recommended to read a book on responsive design.

em does not support webkit browsers.
Some browsers have different understandings of %. For example, in some versions of IE browsers, there is a nesting problem in percentage (the value is a percentage of the font size of a parent object). See: http://msdn .microsoft.com/en-us/library/ie/ms530759(v=vs.85).aspx

For fluid layout, it is better to use xx-small, x-small, small, medium, large, x- large, xx-large to comment.

The use of rem is the same as em, with global support

Related labels:
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