Forum Discussion

PhilMayor's avatar
PhilMayor
Super Hero
4 months ago
Solved

Diagonal fill on hover

I am at a loss on this one.

I want to create a diagonal fill on hover, and I am failing badly.

Something like this https://www.pwc.com/gx/en/issues/value-in-motion.html

I have tried using clip-path and the best I got was the shape permanently disappeared, but no animation.

I then tried overlaying a child div but suspect storyline doesn't support it. 

Sorry haven't posted code as I think I am going down rabbit holes, this one may break me.

 

3 Replies

  • Seb that is perfect, thank you for taking the time to do that. I think I was 75% of the way there but would have never got there so thank you!

     

  • Seb_Daubert's avatar
    Seb_Daubert
    Community Member

    You will find some parameters in the js, such as speed, colors, easing, scale, and starting position, that you will need to adjust to your needs.

  • Seb_Daubert's avatar
    Seb_Daubert
    Community Member

    Hello, I think this is exactly the example you wanted...😉