Home >Web Front-end >HTML Tutorial >font-size : 100%_html/css_WEB-ITnose
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?
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