This application note provides an example of how to add a Ken Burns effect to a Slideshow block using custom CSS.
The custom CSS code, which can be viewed by clicking the pen icon in the "Custom CSS URL" field of the slideshow, looks like this:
.slide-show .slide-show-slides .active-slide {
animation-name: ken-burns;
animation-duration: 11s;
animation-timing-function: linear;
}
@keyframes ken-burns {
0% {
transform: scale(1);
}
100% {
transform: scale(1.2);
}
}
A CSS @keyframes animation (named ken-burns) zooms in on the image by scaling it to 1.2 times its size (using transform: scale()). The .active-slide class, which is automatically added by Blocks to the currently playing slide, runs the ken-burns animation for 11 seconds.
A couple of notes regarding the methods used in this application note: