Layout FadeIn (ease-in-out) CSS when using attachHTML

Iā€™m using CSS to create a polished fade-in look when a layout containing an img is first presented on the screen:

.layout_fadein { animation: appear 1.0s ease-in-out forwards; }

When a User initiates a specific action, I change the image with attachHTML but this is very abrupt and jarring to the eye. Does anyone have any ideas how I can utilize CSS when changing this img to simulate the original fade-in used? Any ideas are appreciated. Thanks!

Could you please, clarify your issue with details or a code snippet.
Here is the example according to your description:

1 Like

This is exactly what I was looking for. Thank you! It works perfectly for my application.