Search code examples
htmlcssbackground-image

positioning multiple background images


This is my code.I want to move that yellow circle to right (about 25px) .how can I give that style to the second image only.

.img_home
{
    background-repeat: no-repeat;
    height: 1000px;
    background-image: url(http://www.spidycode.com/testing/revibe/images/Circle1.png),url(http://www.spidycode.com/testing/revibe/images/Circle2.png);
}
<div class="img_home"></div>


Solution

  • Try this

    .img_home
    {
        background-repeat: no-repeat;
        height: 1000px;
        background: url(http://www.spidycode.com/testing/revibe/images/Circle1.png) 25px top no-repeat,url(http://www.spidycode.com/testing/revibe/images/Circle2.png) no-repeat;
    }
    <div class="img_home"></div>