Yes, you can overlay header text on top of a Lottie animation in Webflow by placing both elements inside a relatively positioned container and using absolute positioning for the text.
1. Add a Wrapper Div
- Drag a Div Block into your header section and give it a descriptive class name (e.g.,
header-wrapper
). - Set the position of this wrapper to relative.
- Set the width and height according to your header layout — often full width and a fixed or viewport height.
2. Add the Lottie Animation
- Inside the wrapper, add your Lottie Animation element.
- Set its width and height to 100% so it fills the wrapper.
- Optionally, set object-fit to cover if it’s not scaling as expected.
- Drag a Text Block or Heading element into the same wrapper, after the Lottie animation.
- Set the position of the text element to absolute.
- Choose your alignment (e.g., top center, center center) via positioning controls or top: 50%; left: 50% with transform: translate(-50%, -50%) for perfect centering.
- Style the text (font size, color, etc.) to ensure it’s readable over the animation.
4. Adjust Layering with Z-Index
- Make sure your header text has a higher z-index (e.g.,
z-index: 10
) than the Lottie animation (z-index: 1
) so it appears above. - If needed, also set the Lottie animation’s position to relative or static, just not absolute, or it might cover the text unintentionally.
5. Test Responsiveness
- Use Webflow’s responsive viewports to test and adjust how your layout behaves across devices.
- Consider adding background overlays (semi-transparent color layers) if the Lottie animation visually interferes with the readability of the text.
Summary
To overlay header text on a Lottie animation in Webflow, place both elements inside a relatively positioned wrapper, absolutely position the text, and use z-index layering to keep it above the animation.