Xara has recently released its sliders that are a vast improvement of early versions.
They still have a few challenges to overcome.
I am not in competition with the release but I feel the major omission is not fading out the previous slide.
This causes a problem with any slides that have any Transparency.
THE APPROACH
All SVG shapes or images have a ClassName htmlclass="slide"
- Add in your slide collection
- Add the ClassName to each
These can be positioned anyhow and anywhere.
I chose to put them all in a Group and in a !Slides layer to keep the clutter down.
The other advantage for this is you need only apply htmlclass="slide" to the group.
You can quickly add or remove your slides.
Hide the !Slides layer.
Note how many you have so marked or are in the group
Decide on a display time for each slide.
Open the Page HTML code body and make the following adjustments:
- Change the --time CSS variable
- Change the --slides CSS variable
- Increment the .slide:nth-child(nn) { animation-delay: calc( ( nn - 1 ) * var(--time) ); } statements to equal the number off slides
- HARDEST PART: For the @keyframes statements, divide 100% by the number of slides:
- This has to be the difference between the first percentage (here 2%) and the second (here 6%) - the difference here is 4% as there are 25 slides
- The first percentage is the lead in, the second is the display and the third, the tail off
- Apply everything and Preview
Here is my demo file (all SVGs for file size): 20240803-CSS-Group Slider.xar
The transform functions in the @keyframes statements are just there to show you can manipulate your slides a a wide range of fashions.
Acorn
Bookmarks