Jump to content
Search Community

Animating from curved shape to rectangle

Policsek test
Moderator Tag

Recommended Posts

Hi, I'm working on a page transition animation. When leaving the page, I want to animate an element ( from height 0 to 100vh ) which will cover the whole page. This is easy, but what if I want to animate the element from a curved shape to a full rectangle ( like here, https://adrienlaurent.fr/ , use the nav bar to see the effect). 

 

My poor effect is simple and works just fine, but I'm not sure where should I start to animate it from that shape. I know I might need to use a SVG, but still confused. Maybe "border-top-left-radius & border-top-right-radius" could also help? 

 

Thank you!

See the Pen oNZJveR by bogdan-florin (@bogdan-florin) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...