Grow your CSS skills. Land your dream job.

Sprite and background-size:

  • Rai
    # January 17, 2013 at 11:30 am

    Hi there,
    I´m trying to creat a infinite background image with sprite and background-size using:

    background-size:contain; but when I put it on the image fly away instantly.

    Any idea, tutorial or link about this?

    My code is:

    background: #0e3d77 url(../pagoranking_child/images/pagorakingsprite.png) no-repeat center -330px;
    height: 181px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background-size: contain;

    # January 17, 2013 at 11:37 am

    Perhaps creating this in Codepen would help us see your problem.

    I’m not sure you understand what a sprite is for.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".