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;
But in the latest version of Google. This attribute is not supported and needs to be resolved by CSS3 transform, as follows:
CSS Section |
HTML Layout |
body,p{margin:0; padding:0;} p{font-size:10px;} Span{-webkit-transform:scale (0.8);-o-transform:scale (1); display:inline-block;} |
<p><span id= "Span1" > I am a font less than 12PX </span></p>
|
Explain:
1.{webkit-transform:scale(
0.8
);
display
:inline-
block}
//
0.8
位缩放倍数,具体自己根据实际需求修改,只能缩放可以定义宽高的元素,而span是行内元素,
Why define Display:inline-block instead of Display:block? The block is the exclusive line, so convert to Inline-block
2.{-o-transform:scale (1);} Opera is now the latest version of the WebKit kernel, the new version of Opera, is originally a 10px font.
Smile. Angle of rotation
qq:493177502
"CSS" How to let chrome support less than 12px of text