Is it possible to disable font smoothing in CSS?

旧城冷巷雨未停 提交于 2019-11-26 21:47:28

问题


I want some small fonts to look with no smoothing. Is it possible to disable font smoothing using HTML/CSS?


回答1:


Yes, it's possible, but not for all browsers.

font-smooth: auto | never | always | <absolute-size> | length | initial | inherit
-webkit-font-smoothing : none | subpixel-antialiased | antialiased 

For your case:

font-smooth: never;
-webkit-font-smoothing : none;

UPD(for Chrome): Force Font Smoothing in Chrome on Windows




回答2:


Yes, although I can't say which browsers will take any notice of you!

You can write

<p style="font-smooth:never;">

to get the effect you want.


EDIT

I was sure I had used this some months ago, but I read on the Mozilla Network

Though present in early (2002) drafts of CSS3 Fonts, font-smooth has been removed from this specification and is currently not on the standard track.

Sorry!




回答3:


try font-smooth: never;

http://webdesign.about.com/od/styleproperties/p/blspfontsmooth.htm



来源:https://stackoverflow.com/questions/10538570/is-it-possible-to-disable-font-smoothing-in-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!