在 HTML5 中使用 javascript 创建文本效果(如 Flash)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4780093/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 14:51:42  来源:igfitidea点击:

creating text effects (like flash) using javascript in HTML5

javascriptjqueryhtmltext

提问by Bhupi

Can somebody suggest me how to create text effects (like we can create in flash) in HTML 5 using javascript/jquery. And also the custom font for whatever text is appearing there? Is it possible? any example?

有人可以建议我如何使用 javascript/jquery 在 HTML 5 中创建文本效果(就像我们可以在 flash 中创建)。还有出现在那里的任何文本的自定义字体?是否可以?任何例子?

Thanks in advance.

提前致谢。

回答by Richard

You really need to look at Css3 for text based effects. But if you want to create full animations then Canvas would be your HTML5 tech of choice.

您确实需要查看 Css3 以获得基于文本的效果。但是如果你想创建完整的动画,那么 Canvas 将是你的 HTML5 技术选择。

Try taking a look here:

试试看这里:

http://canvas-text.googlecode.com/svn/trunk/examples/animation.html

http://canvas-text.googlecode.com/svn/trunk/examples/animation.html

http://aaronwinborn.com/blogs/aaron/cuf%C3%B3n-alternative-sifr-image-replacement

http://aaronwinborn.com/blogs/aaron/cuf%C3%B3n-alternative-sifr-image-replacement

Cufon draws fonts onto canvas so you could then animate them with javascript.

Cufon 将字体绘制到画布上,以便您可以使用 javascript 为它们设置动画。

http://www.8bitrocket.com/2010/05/15/html-5-canvas-creating-gaudy-text-animations-just-like-flash-sort-of/

http://www.8bitrocket.com/2010/05/15/html-5-canvas-creating-gaudy-text-animations-just-like-flash-sort-of/

http://speckyboy.com/2009/11/16/20-easy-to-use-jquery-text-effects-and-animations/

http://speckyboy.com/2009/11/16/20-easy-to-use-jquery-text-effects-and-animations/

here:

这里:

http://www.catswhocode.com/blog/8-examples-of-stunning-css3-text-effects

http://www.catswhocode.com/blog/8-examples-of-stunning-css3-text-effects

here:

这里:

http://www.addictivefonts.com/various/css3/css3-text-effects/

http://www.additivefonts.com/various/css3/css3-text-effects/

and here:

和这里:

http://code.google.com/webfonts

http://code.google.com/webfonts