How the mobile side defines the font font-family

Source: Internet
Author: User

How the mobile side defines the font font-family
Chinese font Use system default, English with Helvetica

/* Code to define the font for the mobile side */
Body{font-family:helvetica;}
Refer to "Thinking of using fonts on the mobile side"

Mobile font Unit font-size Select px or REM
For devices that only need to be adapted to a mobile device, use the PX

For devices that need to be adapted to a variety of mobile devices, use REM, such as a device that only needs to be adapted to different resolutions, such as iphone and ipad.

REM Configuration reference:

Copy Code
HTML {font-size:10px}

@media screen and (min-width:480px) and (max-width:639px) {
HTML {
font-size:15px
}
}

@media screen and (min-width:640px) and (max-width:719px) {
HTML {
font-size:20px
}
}

@media screen and (min-width:720px) and (max-width:749px) {
HTML {
font-size:22.5px
}
}

@media screen and (min-width:750px) and (max-width:799px) {
HTML {
font-size:23.5px
}
}

@media screen and (min-width:800px) and (max-width:959px) {
HTML {
font-size:25px
}
}

@media screen and (min-width:960px) and (max-width:1079px) {
HTML {
font-size:30px
}
}

@media screen and (min-width:1080px) {
HTML {
font-size:32px
}
}

Did you like this article? Share it with your friends!

How the mobile side defines the font font-family

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.