Jump to content
Search Community

Recommended Posts

Posted

Hi!
I've made an SVG image with several different objects. The interaction would be this:
- If you hover an element there would be a small effect on this element. (a scale, rotate and move depending on the mouse position.)
- If you hover out the element get back to the original position.
Currently, I have a problem with the targeting, the effect animates all the elements in the SVG. ...And some with the mouse position tracking:)
How can I solve this? 
Thanks for the help in advance :)

See the Pen ExQWZem by szsoma (@szsoma) on CodePen.

Posted

Hi @soma :)

 

Welcome to the forum.

 

Probably easiest to create a tween for each one and play/reverse on mouseenter/leave. Maybe something like this.

 

See the Pen 81af104f98ab206012f97eab84edc8b9 by PointC (@PointC) on CodePen.

 

 

Happy tweening and welcome aboard.

:)

 

  • Like 1
Posted

Hi!

Thanks for the quick answer. I think I just overcomplicated this issue ?

  • Like 1
Posted

just sneaking in to say this pen is cute. 10/10

  • Like 1
Posted

Glad to help and don't worry about overcomplicating it. It happens to all of us.

 

Happy tweening.

:)

 

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...