A Freeway user who is starting to use Xway has asked how they can create an animation that is similar to: example_02
This example uses JavaScript, and was probably created using a Freeway Action, but a simple way to create this effect in Xway is to use CSS animations.
Here is an example of how to create a moving box in Xway:
- Insert a box and give it absolute position
- Set the width to be 10px and the height to be 50px
- Delete the minimum width and minimum height
- Set the right offset to be zero
- Give it a background colour
- Add the following properties in the Extended Properties section of the Box Inspector (don’t type [Name] or [Value] - these indicate where to enter the property name and property value): animation-duration [Name], 5s [Value], animation-iteration-count [Name], 1 [Value], animation-timing-function [Name], linear [Value], animation-name [Name], moveRight [Value]
- Add the following markup in the CSS Markup section of the Page Inspector:
@keyframes moveRight
{
from { right: calc(100% - 10px) }
to { right: 0 }
}
For more information on CSS animations, see: CSS Animations and Using CSS Animations.