All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

CSS-Only Menu Reveal Animation Using Clip-Path Techniques

By

momciloo

3mo ago· 1 min readenCode

Summary

A developer shares a code exploration project implementing a menu reveal animation using only HTML and CSS with clip-path techniques. The project demonstrates a circle that grows from the top-left to bottom-right corner to reveal a menu, using vmax units and mathematical calculations (multiplying by 1.42, which is the square root of 2). The work is inspired by another developer's implementation and focuses on pure CSS solutions without JavaScript.

Key quotes

· 4 pulled
In this example, I'm trying to implement a menu that is revealed when the user clicks on a button. With HTML+CSS only. No JS.
The menu is revealed by a circle that grows from the top-left corner of the screen to the bottom-right corner.
A fun clip-path calculation that I used here (clip-path: circle(calc(1.42 * 100vmax) at 0 0);) is based on the vmax, which is the larger of the viewport width or height.
Then multiplied it by 1.42, because 1.42 is the square root of 2.
Snippet from the RSS feed
Contribute to Momciloo/fun-with-clip-path development by creating an account on GitHub.

You might also wanna read