有没有一种方法可以使字体的梯度动画?

发布于 2025-01-23 19:10:22 字数 875 浏览 1 评论 0原文

假设我想使用这种字体:

@font-face {
  src: url("https://cdn.glitch.global/f206356a-29f3-4941-a91f-d78ba238df98/Abelone-FREE.otf?v=1650648293770") format("opentype");
  font-family: "Abelone";
}

* {
  font-family: "Abelone";
  font-size: 80px;
}
Hello, world.

有没有办法用CSS或JavaScript来动画包含的梯度?如果没有,例如,是否有其他仅使用SVG或剪裁口罩进行类似的方法?

重要:铬不会显示梯度。请使用Firefox查看它们。

编辑:Opentype SVG字体显示/渲染

​a href =“ https://blog.adobe.com/en/publish/2017/11/11/02/color-font-week-abelone” rel =“ nofollow noreforler”> colorfontweek - abelone

Let’s say I would like to use this font:

@font-face {
  src: url("https://cdn.glitch.global/f206356a-29f3-4941-a91f-d78ba238df98/Abelone-FREE.otf?v=1650648293770") format("opentype");
  font-family: "Abelone";
}

* {
  font-family: "Abelone";
  font-size: 80px;
}
Hello, world.

Is there a way to animate the included gradients with CSS or JavaScript? If not, are there alternative ways to do something similar using just SVG or clipping masks, for example?

Important: Chrome doesn’t show the gradients. Please use Firefox to view them.

Edit: Opentype Svg font display/rendering

Opentype Svg (colored) Font Support

  1. Colored Opentype Svg fonts supported (firefox, edge, ios safari)
  2. Opentype Svg font features not supported (e.g chrome)

About used font: ColorFontWeek – Abelone

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

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

发布评论

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

评论(1

冰火雁神 2025-01-30 19:10:22

CSS过滤器可能会有可能。

HTML代码:

<div class=animated>Does it work?</div>

CSS:

div.animated {
filter: hue-rotate(50deg);
}

这应该更改颜色。

It's possible with an CSS filter.

HTML Code:

<div class=animated>Does it work?</div>

CSS:

div.animated {
filter: hue-rotate(50deg);
}

This should change the colors.

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