关于chrome的字体怎么设置小于12px的问题

来源:互联网 发布:网络协议的四层模型 编辑:程序博客网 时间:2024/05/01 00:27
刚用了chrome浏览器发现无法显示12px以下的字体,于是去stackoverflow上查了下。发现以前可以用-webkit-text-size-adjust来改变,但是Chrome 27之后不能用了,经过查找偶发现了这个
<!DOCTYPE html><html><head><title>Putting it all together</title></head><body><p style="font-size:10px;transform: scale(0.833);margin-left:-38">A truly spectacular paragraph!</p><p style="font-size:10px">A truly spectacular paragraph!</p></body></html>

效果不错,由于
transform: scale(0.833)
是整体缩放所以得设置margin-left(我这是10px的  0.833=10/12)
1 0
原创粉丝点击