CSS 是否支持文本抗锯齿,例如“清晰、锐利等”?然而?

发布于 2024-11-03 17:41:15 字数 132 浏览 4 评论 0 原文

我在 Photoshop 和 Photoshop 中有一些文字。它被设置为“脆”。当我把它放在我的网站上时,它看起来不太一样。

CSS 中是否存在可以让我变得清晰的东西?或不?

或者您有什么建议可以达到类似的效果吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

累赘 2024-11-10 17:41:36

试试这个代码片段

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

Try This code snippet

 body {
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}
狠疯拽 2024-11-10 17:41:35

这是我在一家大公司的网站上找到的:

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;}

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;}
一萌ing 2024-11-10 17:41:35

您真正要问的是:

“是否可以从 Web 开发的角​​度控制抗锯齿?”

就目前而言,至少在未来一段时间内(直到操作系统/浏览器供应商开始提供这种开发控制[不要屏住呼吸]),答案无疑是:不。

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.

乄_柒ぐ汐 2024-11-10 17:41:34

这不仅不可能,而且市场上不同的浏览器强制执行不同的抗锯齿设置,这意味着您无法获得一致的结果,即使它们不是您想要的。

有关各种浏览器如何处理字体渲染的好文章,我建议阅读以下内容: http://blog.typekit.com/2010/10/21/type-rendering-web-browsers/

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文