Forums

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

Home Forums CSS [Solved] CSS Logo animation zoom-in from the wrong side

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #187372
    xellos81
    Participant

    Hello,
    I’m here, on this test-project, trying to learn new CSS tecniques (thanks css tricks!), like CSS animation and something similar.

    I’m trying to make the logo zoom-in + fade-in from the center
    but instead it zoom-in from the up-left corner

    can somebody tell me what am I doing wrong?

    This is my CodePen

    thank you in advance

    #187374
    shaneisme
    Participant

    Be sure to run your code through a validator, you’ve got at least one typo on the css property text-align (you have it set to “aling” under .big-logo)

    #187377
    xellos81
    Participant

    thank you! …but that did not solved my problem :(

    (codepen updated)

    #187401
    Paulie_D
    Member

    It would be more helpful if you gave us a reduced case in Codepen removing all of the cruft *not** related to this issue.

    We (certainly I) hate wading through reams of unrelated code just to find one tiny speck of stuff.

    Quite often doing this will enable to to concentrate on the specific issue and possibly find the solution on your own.

    http://www.sscce.org/

    #187403
    xellos81
    Participant

    you’re totally right, but the thing is, that I’m afraid that there is something wrong between this part interacting with other aspects of the page, that’s why I kept it as it is

    #187404
    xellos81
    Participant

    Yay!
    I’ve found the solution myself

    I just had to add a new and centerd “margin-left” to the animation

    @-webkit-keyframes biglogo_in {
    0% { opacity: 0; }

    50% { opacity: 0;
    margin-left: -19vw;
    width: 38vw;
    margin-top: -3vw;}

    100% { opacity: 1;
    margin-left: -22vw;
    width: 44vw; }
    }

    this is the new and working CodePen Link

    #187437
    shaneisme
    Participant

    you’re totally right, but the thing is, that I’m afraid that there is something wrong between this part interacting with other aspects of the page, that’s why I kept it as it is

    That’s exactly why you do it – to find out if that’s the case or not.

    It looks good to me at certain viewport sizes, but at especially small ones it gets messed up pretty quickly.

    Also, just in case you didn’t know: http://caniuse.com/#search=viewport – decent support for viewport units but it’s not perfect by any stretch.

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