Jump to content
Search Community

Change background color from top to bottom

maxvia test
Moderator Tag

Recommended Posts

Hey maxvia.

 

This is a browser-level restriction: you can't animate a background-color from any direction in any browser with any tool.

 

With that being said, you can fake it by making an element within the element look like the background and then animating that element. Exactly how you should set it up and animate it depends on the exact effect that you're going for. Here's a super simple example:

See the Pen qBadQYo by GreenSock (@GreenSock) on CodePen

  • Like 4
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...