如何使用小于 1px 的字母间距

发布于 2024-11-26 19:21:52 字数 243 浏览 0 评论 0原文

我有一个网络字体,我试图让间距恰到好处。我将其设置为字母间距:.03px。在 Firefox 5 中工作得很好,但我知道这不能跨浏览器工作。我能做些什么来帮助解决这个问题吗?或者这可以在哪些浏览器中运行?

font-family: 'FSS Light',Times;
font-size: 15px;
letter-spacing: 0.3px;
line-height: 20px;
margin: 0 0 1em;

I have a web font that I am trying to get the spacing just right. I have it set at letter-spacing: .03px. Works great in firefox 5, But i know this doesn't work across browsers. Is there anything i can do to help this? or what browsers would this work in?

font-family: 'FSS Light',Times;
font-size: 15px;
letter-spacing: 0.3px;
line-height: 20px;
margin: 0 0 1em;

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

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

发布评论

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

评论(2

乱了心跳 2024-12-03 19:21:52

您是否尝试过使用 em

letter-spacing: .5em;

是的 Ems 适用于所有浏览器,并且由于可扩展性和移动设备友好性,它们在 Web 文档中变得越来越流行。

Have you tried with em

letter-spacing: .5em;

Yes Ems works on all browsers and they are becoming increasingly popular in web documents due to scalability and their mobile-device-friendly nature.

飞烟轻若梦 2024-12-03 19:21:52

正如 Warface 所建议的,你可以使用 em、cm 或其他任何名称。
但如果您需要字母靠得更近,您也可以使用负值。

letter-spacing: -1px;

示例: http://jsfiddle.net/eZbYB/2/

As suggested by Warface, you could em, cm or whatever.
But if you need your letters to get closer together, you can also use negative values.

letter-spacing: -1px;

Example: http://jsfiddle.net/eZbYB/2/

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