Overview
I had the opportunity to work on a landing page for Lego Taiwan, hosted on the Momo platform. The project required complex positioning and animations of various elements to create an engaging user experience, with a key focus on delivering the page in a lightweight format using plain HTML, CSS, and JavaScript.
Challenge
The client required the landing page to be delivered as a static file that could be easily opened and run directly in the browser. This meant avoiding dependencies on any complex build systems or bundlers. The animations and positioning, however, needed to be visually intricate and dynamic, posing an additional challenge. Finding a framework that could build down to plain HTML/CSS/JS without any runtime dependencies was critical.
My Role
I collaborated with another developer to deliver the project section by section. I provided support, particularly for the more complex sections that required advanced positioning and animations. I ensured cross-browser compatibility and responsiveness across mobile phones and medium-to-extra-large desktop devices. My work included scroll-driven scenes that combined layered LEGO artwork with parallax movement. Characters, vehicles, and environmental elements floated independently to create depth, while transitions carried the experience between themed worlds. I used transform-based positioning to keep complex elements aligned across screen sizes.
Results & Impact
The landing page was delivered successfully with all animations and positioning working as expected, creating a visually engaging experience that aligned with Lego’s brand identity. The client was highly satisfied with the seamless functionality and ease of deployment on the Momo platform
Learnings
- While working on this project, I discovered that using
transform: translate()often provides better results when working with absolutely positioned elements, compared to relying solely ontop,left,bottom, orright. This approach was especially helpful when certain elements needed to remain fixed relative to the entire screen size, ensuring consistency across different screen dimensions. - I also explored various frameworks to generate static HTML, CSS, and JavaScript. After testing several options, I found Astro to be the best fit. It allowed me to compile down to pure HTML/CSS/JS, which could be opened directly in the browser without any additional steps.