Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

GSAP Adaptation of Codedrops Hover Effect

Recommended Posts

I was trying to adapt Carl's dash chaser to pull this off http://tympanus.net/Tutorials/BorderAnimationSVG/ . I am having little success. Is there anyone that could help me out with this?


I will put it out there that adapting the three paths of Carl's chaser dash animation to this problem is confusing to me. I felt to pull this off, I would need an offset of 1, but in the codedrops demo they are using a border line that is 3x the length of any border with a dash offset equal to the border length. They simply translate the line and the offset makes it look like the border is animating within the viewbox.

See the Pen MYMOpP?editors=001 by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

Hey jstafford :),


You really wouldn't need any dashes or extra length borders to make this happen with drawSVG. It's just a matter of using a fromTo() a couple times to animate the lines.


I made a quick CodePen for you: 

See the Pen VeKgNX by PointC (@PointC) on CodePen


You'll have to adapt it for your use, but it should get you started.


Happy tweening. :)

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