CSS sets the font of a webpage to prevent browser page font Deformation

Source: Internet
Author: User

I can't tell you what went wrong on the computer. I saw a lot of webpages and the fonts changed. It wasn't Song. It looked ugly.

Take SOHU for example. It seems like this on my computer. It may not be easy to see, but Netease does not.

It is assumed that SOHU does not set the font of the webpage. I briefly read their CSS Code (not detailed ). I found no font-family. netease has one. font-family: "", arial;

I have found that many people do not like to set fonts when writing CSS. if someone like me. computer problems often occur. I don't know how to use the font. I don't know how to change it back. then the font of the webpage is like this. I think the Earth is so big. there should be many people like me. so. set the font of the webpage when writing CSS.
Someone may ask:
1. How to set the font in CSS?
A: add this line to the CSS file.Copy codeThe Code is as follows: body {font-family: Verdana, "", Arial, Sans ;}

2. Why do you put "Verdana" in front of "?
A: Let's give you two examples!
A. in this example, I set font-family: Verdana, "", Arial, Sans;Copy codeThe Code is as follows: <style> body {font-family: Verdana, "", Arial, Sans; font-size: 12px ;}</style> A. In this example, I set font-family: Verdana, "", Arial, Sans; <br/> do I see what the English text shows? <Br/> example website: <a href = "http://shanghai.kijiji.cn" target = "_ blank"> customer collection </a> <br/>

In this way, the English font looks better and VERDANA is used for display. It is not displayed in Chinese.

B. In this example, I set font-family: "", Verdana, Arial, Sans;Copy codeThe Code is as follows: <style> body {font-family: "", Verdana, Arial, Sans; font-size: 12px ;}</style> B. In this example, I set font-family: "", Verdana, Arial, Sans;
<Br/> what is the English text experience displayed? <Br/> example website: <a href = "http://www.163.com" target = "_ blank"> Netease </a> <br/>

In this way, it is uncomfortable to write English fonts on webpages. NetEase does not need to write such fonts. I believe there must be some reason.

Note: The preceding statement is only applicable to WINDOWS operating systems.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.