Does CSS support text anti-aliasing such as “crisp, sharp etc” yet?

送分小仙女□ 提交于 2019-11-27 03:12:45

问题


I have some text in Photoshop & it's set to "crisp". When I put it on my site it doesn't quite look the same.

Does anything exist in CSS yet that I can use to make it crisp? Or not?

Or do you have any suggestions to achieve a similar effect?


回答1:


Not only is it not possible, but different browsers on the market enforce different antialiasing settings, meaning that you can't get consistent results, even if they are not what you want.

For a good article on how the various browsers deal with font rendering, I'd suggest reading this: http://blog.typekit.com/2010/10/21/type-rendering-web-browsers/




回答2:


this is what I found on a big company's web site:

body, table, form {
font: 12px/18px "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 
background-color: transparent; 
color: #333; 
-webkit-font-smoothing: antialiased;}



回答3:


What you're really asking is:

"Is it possible to control anti-aliasing from the web development perspective?"

The answer, for now, and for at least some time into the future (until OS/browser vendors start giving that kind of developmental control [don't hold your breath]) is undeniably: NO.

  • Forcing AA is a myth
  • No way to smooth text
  • Use images to simulate AA



回答4:


Forcing anti-aliasing using css: Is this a myth?




回答5:


Try This code snippet

 body {
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}


来源:https://stackoverflow.com/questions/5811166/does-css-support-text-anti-aliasing-such-as-crisp-sharp-etc-yet

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