Setting the font for the entire site has always been a simple yet difficult task, because when you go deeper, there are too many things involved. This article mainly wants to talk about how to choose fonts according to your needs for an ordinary website. First of all, we should make it clear that just because you set this font, it does not mean that the user's computer will display in this font. If the user's computer does not have this font installed, it will be rendered in the second font you set. Look at a common setting XML/HTML CodeCopy content to clipboard
If the above code is set on a machine without Tahoma font, the machine will render with Arial font. If neither is available, then use the latter. If the font you specify is not available, a font from the sans-serif font family will be used. Sans-serif means sans serif font. It is not a type of font, but a general term for a type of font. Correspondingly, serif means using serif fonts. (To explain: serifs are very small modifications on the font. You can search Baidu for details. It is not relevant to this article, so I will not elaborate on it.) •serif: font with serifs. Times New Roman is the default serif font. For Chinese fonts, it is Songti, Fangsong and the like. •sans serif: sans serif font. Arial is the default sans-serif font. Among Chinese fonts, Microsoft YaHei and Heiti are all of this type. English fonts include Helvetica, Geneva or Verdana. •monospace: monospace font. Every letter in this font has the same width. Usually used to display program code, etc., Courier is the default monospace font. For Chinese, each character is of equal width. After reading the necessary knowledge above, you must have a more systematic understanding of fonts. So how do you set the website font? Some people are used to using Songti, Arail or Tahoma as their first font. However, there is a big problem here. For larger font sizes (above 16px), the rendering is quite ugly. However, I use the font optimization tool under Windows on my computer, so I can’t show it to you. All in all, for large fonts, this setting is pretty ugly. There is a big problem here. YaHei is only available in Windows Vista. For XP users, which have a user share of 65%+, setting up YaHei is the same as not writing it. They still use Songti or something like that to render it. Except when you are comforting yourself or dealing with your boss (your boss usually follows the trend and uses Windows 7 or above). Really useless for most users. Moreover, Microsoft YaHei is not as good as Songti when rendering 12px fonts. After the above analysis, I summarized a setting method that I think is pretty good The font settings for the entire site are as follows XML/HTML CodeCopy content to clipboard
Then use images for large and important text (such as navigation). Because after using pictures, you don’t have to worry about whether the user has installed this font, and you can make it more beautiful, with more scalability and possibilities. The font of the whole site is still XML/HTML CodeCopy content to clipboard
Then for the large font (it doesn’t matter whether it’s important or not here). Set up individually XML/HTML CodeCopy content to clipboard
This setting can save a lot of work on the front end, but many XP users will be annoyed by the large font size. direct XML/HTML CodeCopy content to clipboard
XML/HTML CodeCopy content to clipboard
The above brief discussion on font settings on web pages is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. </p> Original URL: http://www.cnblogs.com/qqziyuan8/archive/2016/08/01/5726310.html |
<<: How to convert Chinese into UTF-8 in HTML
>>: How to quickly deploy Redis as a Docker container
The detailed process of installing python3.7.0 on...
For MySQL 5.5, if the character set is not set, t...
1. Introduction to yum Yum (full name Yellow dogU...
In our recent project, we need to use Google robo...
Solution: Bind the click event to the audio compo...
Table of contents 1. v-for: traverse array conten...
1. Create the backup.sh script file #!/bin/sh SOU...
watch : listen for data changes (change events of...
This article example shares the specific code of ...
Linux is generally used as a server, and the serv...
I remember that a few years ago, there was an int...
Table of contents 1. Introduction to calculator f...
This article shares the specific code for JavaScr...
Recently, I need to frequently use iframe to draw ...
Use CSS to modify the browser scroll bar style ::...