Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Rotation with Hover – Help

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #242733
    lewis712
    Participant

    I have the following code:

    https://codepen.io/gtdesign/pen/JKGmeO

    I would like help in seeing if there is a way to hover over one of the circles, say for instance “Gutters” that the rotation stops and the “Gutters” circle gets larger and changes color.

    Any help would be appreciated.
    Thanks,
    Andy

    #242954
    lewis712
    Participant

    Could anyone possibly help?

    Thanks,
    Andy

    #242955
    amanda_
    Participant

    I just took a quick look, can’t make a demo right now, but one thing you could do is attach and remove a class on hover, and the rotation triggered by that class.

    #242969
    lewis712
    Participant

    When you have a free moment, can you help me with that? I’m struggling as it is with javascript, ugh.

    Andy

    #242970
    amanda_
    Participant

    Actually I think you might be better using greensock or another animation library.

    With the add and remove class it resets the rotation. I did a quick attempt here, and you’ll see it doesn’t interact with the css timeline. I think you’ll need to do your animation in js. I never use css animations, so I am not sure what limitations they have, but you would be able to achieve this with greensock with relative ease.

    http://codepen.io/ald603/pen/NrrBjQ?editors=1010

    #242971
    lewis712
    Participant

    I’m not at all familiar with Greensock so it’d basically mean I’d have to start over. Would what I have created be easy to recreate in greensock?

    #242974
    amanda_
    Participant

    Here you go, I started it for you.

    http://codepen.io/ald603/pen/NrrBjQ

    #242975
    bearhead
    Participant

    I would just use animation-play-state:
    http://codepen.io/kvana/pen/QEEJjX

    #242976
    amanda_
    Participant

    Ah, that looks good. I always reach for greensock because it’s easy to use. But if there’s a pure css solution, might as well go for that if it works in all the browsers.

    #242993
    lewis712
    Participant

    That’s awesome that you got it working. When I put it on my page, i can’t get the stop feature to work, it just keeps rotating.

    http://gtconcepts.co/br/

    Andy

    #242995
    bearhead
    Participant

    You need to wrap the contents of the rotate.js file in a document.ready function. (I updated my pen)

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.