Google browser small Font Processing Solution: fonts below 12 PX _ html5 tutorial skills-

Source: Internet
Author: User
Google Chrome does not support small fonts below 12 PX. Some good solutions can be found on the Internet. If you are interested, refer, I hope to help you. Google Chrome does not support small fonts below 12 PX. It may be because of the user experience.
There are some articles on the Internet that can be used:

The Code is as follows:


-Webkit-text-size-adjust: none;


However, since chrome 27, the support for this attribute is canceled.

Are there other solutions to this problem?

Google Chrome supports CSS scaling, so we can make a fuss about it:

The Code is as follows:


-Webkit-transform: scale (0.5 );


Since the minimum size is 12 PX, the scale is based on 12 PX,

You can also use-webkit-transform-origin-x: 0; To solve the margin-left displacement problem after scaling:

The Code is as follows:


. Test_tag {
Font-size: 12px;
-Webkit-transform-origin-x: 0;
-Webkit-transform: scale (0.5833333333333334 );
}


The scale value is calculated as follows: 7/12 = 0.5833333333333334
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.