Description
The Property
field specifies the CSS property that will undergo a transition. This is part of the TransitionDesc
struct, which is used to describe the transition of a single CSS property, similar to the values of a transition
CSS property in CSS.
Usage
To use the Property
field, assign it the name of the CSS property you wish to transition. This is typically used in conjunction with other fields of the TransitionDesc
struct, such as Duration
, Delay
, and TimingFunction
, to fully define the transition behavior.
Example
// Example of using TransitionDesc to define a transition
TransitionDesc transition = new TransitionDesc();
transition.Property = "opacity"; // The CSS property to transition
transition.Duration = 0.5f; // Duration in seconds
transition.Delay = 0.1f; // Delay before starting the transition
transition.TimingFunction = "ease-in-out"; // Easing function
// This transition can now be applied to a UI element's style change