Javafx中的CSS可以用于动画吗? [英] Can CSS in Javafx be used for animations?
问题描述
这是指向CSS https://daneden.github.io/animate中的动画的链接。 css /
您可以在Javafx中使用这些文件吗?
是的,使用CSS的嵌入式HTML
JavaFX拥有 WebView
/ p>
您可能已经知道以下信息,因此,很可能不是您正在寻找的答案。
您在问题中链接的动画示例(退回,淡入淡出等)可以在代码而不是CSS中处理。 FXExperience提供罐头动画示例库,了解如何完成此类操作。或者,您可以阅读Java教程中的编码动画。
您可以从代码中动画CSS属性,请参阅:
Here is the link to the animations in CSS https://daneden.github.io/animate.css/
Can you use these in Javafx?
Yes, in embedded HTML with CSS
JavaFX has a WebView control which handles CSS animations according to the w3c css animation specification.
No, in the scene graph (with CSS)
The JavaFX 8 scene graph does not support animations with the CSS language itself (as in this w3c css animation specification).
Yes, in the scene graph (with code)
The following information you probably already know and, so, is likely not the answer you are looking for.
The animation sample you link in your question (bounces, fades, etc.) can be handled in code rather than CSS. FXExperience provide a canned animation sample library on how to accomplish such things. Or you can read up on coding animations in the Java tutorials.
You can animate CSS properties from code, see:
这篇关于Javafx中的CSS可以用于动画吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!