Using CSS you can make transitions, this example shows a square that grows when you hover over it. Read the comments they explain how everything works.
let bodyHtml = `
Transitions!
Hover your mouse over the square and watch it grow...
Of course that's not all the transitions have to offer, play around with them and see what you can make!
`;
return {
statusCode: 200,
headers: {
'Content-Type': 'text/html',
},
body: bodyHtml,
};