Fix Chrome Google browser does not support CSS settings less than 12px text

Source: Internet
Author: User

Fix Chrome Google browser does not support CSS settings less than 12px text
Less than 12pxCSS style catalogs are not supported
  1. Problem analysis
  2. Google browser support Font-size Small font method
  3. Resolve the required CSS code
  4. Before and after resolution
  5. Pre-HTML+CSS code not resolved
  6. Resolved after HTML+CSS code
  7. Mastering the explanation
1, Google Browser does not support the setting of CSS small font problem analysis-TOP

Web pages are often used for typography, using large or small text, usually font-size text as 12px (pixel) text. Set larger than 12px text font, each browser can display the CSS text size effect. However, when the CSS setting is less than 12px text Google Chrome will not be able to display CSS settings less than 12px text font effect.

2, Google browser support settings font-size less than 12px resolution Method-TOP

Google Browser default minimum font is 12px, less than 12px font it is displayed in 12px, sometimes we need font dot, especially in the production of English website, often use CSS style display less than 12px text, so that Google Browser can not display the smaller text set. But there is a solution.

3, to solve the required CSS code-TOP

Add a Google browser-specific kernel attribute style to the HTML or body (or you can add a CSS selector if you need to set a small text font object) such as the following CSS code:
Html,body{-webkit-text-size-adjust:none;}

Or
. Divcss5{-webkit-text-size-adjust:none;}

Note: If you use this property, the browser font will not be able to use the Zoom out function! (Just hold down the CTRL key to scroll up and down the middle mouse button)

Try to swap units-useless:
There are also friends who say that using EM (character) as a unit to define font size is useful. I personally tested, with the meaning of the EM font in Google Chrome is not less than 12px. So it's useless. For the time being, I only know one way.

4, set the small font after the browser comparison chart-TOP

Google Chrome about font-size fonts less than 12 pixel contrast chart

Html+css code before and after:

5, set the pre-HTML+CSS code-TOP

6, set CSS style after div+css code-TOP

7, Master and summary-TOP

Google Chrome is the kernel of WebKit, there is a-webkit-text-size-adjust private CSS properties, it can be achieved by the font size does not affect the device or browser.
The CSS style is defined as follows:
-webkit-text-size-adjust:none;

About Google Chrome display CSS style setting font size The problem is finally settled, so that other browsers will not be affected by this CSS style attributes.

If you want to reprint, please indicate the source and origin of the article URL: http://www.divcss5.com/wenji/w321.shtml

Fix Chrome Google browser does not support CSS settings less than 12px text

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.