Font size smaller than 12px doesn't work in Chrome

I encountered a small problem today, which is quite depressing. The font cannot be changed to less than 12px in the Chrome browser. Searching the following online, I found that no matter the Chinese and English numbers in the web page are set to less than 12px in CSS, all major browsers support it, but Google Chrome does not support the solution.

For lower versions of Chrome, you can set a style that calibrates the font size: -webkit-text-size-adjust:none

用法:span.classname{font-size:7px;-webkit-text-size-adjust:none;}

The higher version of Chrome Google Chrome no longer supports fonts smaller than 12px: The
higher version of Chrome Google Chrome no longer supports the -webkit-text-size-adjust style, that is, it does not support fonts smaller than 12px, so use it with caution. In order to be compatible with major browsers, it is best to set the minimum text font size to 12px and above.

DIVCSS5 recommends:

1. Use pictures: If the content is fixed and unchanged, use the content of less than 12px text to be cut out to make pictures, which will not affect the compatibility or affect the appearance.
2. Use a font size of 12px and above: In order to be compatible with major mainstream browsers, it is recommended to set a font size greater than or equal to 12px when designing artwork. If you are receiving an order, you need to explain to the customer that browsers smaller than 12px are not compatible and so on.
3. Continue to use the font size and style setting less than 12px: If you don't consider chrome, you can ignore compatibility, and set -webkit-text-size-adjust:none when setting objects less than 12px to achieve maximum compatibility.
4. Use fonts above 12px: For compatibility and for simpler code, reconsider compatibility under weight.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324611918&siteId=291194637