Forums

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

Home Forums CSS Having trouble aligning items on animation

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #273754
    Cranedrio
    Participant

    I made a logo animation with svg techniques I learned here and from the web. Turned out to be what I expected except for one thing. The center of my logo doesnt appear from the center but instead top left. Any help on how to make appear in the center instead? Thanks in advanced.

    https://codepen.io/Cranedrio/pen/yEddLv

    #273756
    dreamweaverx3
    Participant

    #A-logo {
    opacity: 0;
    animation-name: bounceIn;
    animation-duration: 450ms;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    transform-origin:center;
    }

    #B-logo {
    opacity: 0;
    animation-name: bounceIn;
    animation-duration: 450ms;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    transform-origin:center;
    }

    #273757
    Beverleyh
    Participant

    transform-origin is what you’re looking for. And you can remove a lot of repetition https://codepen.io/anon/pen/jKjgWJ

    #273763
    Cranedrio
    Participant

    Thank you. Can’t believe I missed that line and yeah I can actually remove repetitions. Thanks again.

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