How to solve the invalid problem of CSS setting font size smaller than 12px in Google Chrome. How to implement text smaller than 12px in Chrome.

About how to achieve text smaller than 12px in chrome.
Of course, reducing text to less than 12px will affect usability to a certain extent. It is recommended to ignore this feature of Chrome.

The default minimum font of Google Chrome is 12px. Fonts smaller than 12px are displayed as 12px. Sometimes we need to make the font smaller, especially when making English websites, so it is very painful. There are solutions though.

Add a Google Chrome-specific attribute to the html or body.

html,
body {
    -webkit-text-size-adjust: 100%; //也可以设置为none(推荐用100%)
}

Of course, you can also use transform: scale(.9); to reduce the text size, but it is prone to jaggedness and it is not easy to locate the specific font size pixels.

Guess you like

Origin blog.csdn.net/qq_37860634/article/details/135222214