The demo is as follows:
<!doctype html>
<title>chrome display 12px The following font resolution method </title>
<style type= "Text/css" >
* {
margin:0px;
padding:0px;
Font-family: "Microsoft Jas Black";
}
. px12 {
font-size:12px;
}
. px10 {
font-size:10px;
}
. px8 {
font-size:5px;
}
</style>
<body>
<div class= "px12" >
I'm a 12px.
</div>
<span class= "px10" > I am 12px</span>
<br/>
<div class= "px8" >
I'm a 8px.
</div>
</body>
When this is written, Chrome is not compatible and displays 12th-number fonts, such as:
The first method:
Online Search solutions are:
can use the WebKit kernel of the-webkit-text-size-adjust of the private CSS properties to solve, such as the following code can be successfully resolved, through which the font size will not be affected with the terminal device or browser. The style is defined as follows:
#chrome10px {-webkit-text-size-adjust:none; font-size:10px;}
Just add the-webkit-text-size-adjust:none; The font size is not limited.
Note: However, it is not available after Chrome has been updated to version 27.
The second method:
Another way is to make the text on the picture.
The third method:
Use-webkit-transform:scale (0.5);
Add in Style
. px12 {
font-size:12px;
. px9 {
font-size:9px;
Display:inline-block;
-webkit-transform:scale (0.75), /* 12*0.75=9 */
&NBSP ;
. px6 {
font-size:6px;
Display:block;
-webkit-transform:scale (0.5), /* 12*0.5=9 */
Float:left;
}
Note that -webkit-transform:scale (0.75), which shrinks the size of the entire span, must be converted to block elements, and display:block/inline-block/can be used ... ;
Effects such as:
Chrome displays solutions for the following fonts in 12px