How to design the font size to improve the guest user experience?
Source: Internet
Author: User
Currently, most sites in China use CSS to set the font size to 12 px. Although the pixel is also relative to the size unit, it is only relative to the screen resolution. When the screen resolution is certain, if you feel that the word is too small and difficult to read, you can do nothing in a non-standard browser. Therefore, if you change the unit to em, you can use CTRL + mouse to scroll up the word, you can also use View> text size on the menu to change the word size.
1. in the body tag, set the font size to 62.5%. If no CSS is set in the body, the default size of the browser is 16px with 62.5%, the font size is 16px * 62.5% = 10px. You can use em to set the size easily. For example, if you need 12px, you only need to set 1.2em.
Body {
Font-size: 62.5%;
}
H1 {
Fong-size: 1.4em;/* the size of h1 is equal to 14px */
}
2. If the font size in the body is set to 75%, the font size is 16px * 75% = 12px, and 1em is equivalent to 12px.
Body {
Font-size: 75%;
}
H1 {
Fong-size: 1.5em;/* the size of h1 is equivalent to 18px */
}
The first method is better. For an English website, you can also set it to small, x-small... of course, this will require a higher page design.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.